fix: minor issues
This commit is contained in:
@@ -126,7 +126,7 @@
|
|||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "File Type",
|
"label": "File Type",
|
||||||
"mandatory_depends_on": "question",
|
"mandatory_depends_on": "question",
|
||||||
"options": "Image\nDocument\nPDF"
|
"options": "\nImage\nDocument\nPDF"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "column_break_15",
|
"fieldname": "column_break_15",
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-10-28 12:36:01.978641",
|
"modified": "2022-12-28 16:01:42.191123",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "Course Lesson",
|
"name": "Course Lesson",
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ def sanitize_html(html, macro):
|
|||||||
any broken tags. This makes sures that all those things are fixed
|
any broken tags. This makes sures that all those things are fixed
|
||||||
before passing to the etree parser.
|
before passing to the etree parser.
|
||||||
"""
|
"""
|
||||||
soup = BeautifulSoup(html, features="lxml")
|
soup = BeautifulSoup(html, features="html5lib")
|
||||||
nodes = soup.body.children
|
nodes = soup.body.children
|
||||||
classname = ""
|
classname = ""
|
||||||
if macro == "YouTubeVideo":
|
if macro == "YouTubeVideo":
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"label": "Enrollments"
|
"label": "Enrollments"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"content": "[{\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Get Started</b></span>\",\"col\":12}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"/courses\\\" draggable=\\\"false\\\">Visit LMS Portal</a>\",\"col\":4}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"/courses/new-course\\\" draggable=\\\"false\\\">Create a Course</a>\",\"col\":4}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"/app/web-page/new-web-page-1\\\">Setup a Home Page</a>\",\"col\":4}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"/app/website-settings/Website%20Settings\\\">Website Settings</a>\",\"col\":4}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"https://docs.frappelms.com\\\">Documentation</a>\",\"col\":4}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"https://frappe.school/courses/introducing-frappe-lms\\\">Video Tutorials</a>\",\"col\":4}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"chart\",\"data\":{\"chart_name\":\"Signups\",\"col\":6}},{\"type\":\"chart\",\"data\":{\"chart_name\":\"Enrollments\",\"col\":6}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"<span style=\\\"font-size: 18px;\\\"><b>Statistics</b></span>\",\"col\":12}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Course\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Course Enrollments\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Course Completed\",\"col\":4}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Master</b></span>\",\"col\":12}},{\"type\":\"card\",\"data\":{\"card_name\":\"Course Data\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Course Stats\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Certification\",\"col\":4}}]",
|
"content": "[{\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Get Started</b></span>\",\"col\":12}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"/courses\\\" draggable=\\\"false\\\">Visit LMS Portal</a>\",\"col\":4}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"/courses/new-course\\\" draggable=\\\"false\\\">Create a Course</a>\",\"col\":4}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"/app/web-page/new-web-page-1\\\">Setup a Home Page</a>\",\"col\":4}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"/app/website-settings/Website%20Settings\\\">Website Settings</a>\",\"col\":4}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"https://docs.frappelms.com\\\">Documentation</a>\",\"col\":4}},{\"type\":\"paragraph\",\"data\":{\"text\":\"<a href=\\\"https://frappe.school/courses/introducing-frappe-lms\\\">Video Tutorials</a>\",\"col\":4}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"chart\",\"data\":{\"chart_name\":\"Signups\",\"col\":6}},{\"type\":\"chart\",\"data\":{\"chart_name\":\"Enrollments\",\"col\":6}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"<span style=\\\"font-size: 18px;\\\"><b>Statistics</b></span>\",\"col\":12}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Users\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Course\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Enrollments\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Course Completed\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Certificate\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Evaluation\",\"col\":4}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Master</b></span>\",\"col\":12}},{\"type\":\"card\",\"data\":{\"card_name\":\"Course Data\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Course Stats\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Certification\",\"col\":4}}]",
|
||||||
"creation": "2021-10-21 17:20:01.358903",
|
"creation": "2021-10-21 17:20:01.358903",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "Workspace",
|
"doctype": "Workspace",
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
"type": "Link"
|
"type": "Link"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2022-11-09 17:16:03.973258",
|
"modified": "2022-12-28 17:45:18.539185",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "LMS",
|
"name": "LMS",
|
||||||
@@ -155,16 +155,16 @@
|
|||||||
"sequence_id": 1.0,
|
"sequence_id": 1.0,
|
||||||
"shortcuts": [
|
"shortcuts": [
|
||||||
{
|
{
|
||||||
"color": "Green",
|
"color": "Yellow",
|
||||||
"doc_view": "List",
|
"doc_view": "List",
|
||||||
"format": "{} Published",
|
"format": "{} Enrolled",
|
||||||
"label": "Course",
|
"label": "Enrollments",
|
||||||
"link_to": "LMS Course",
|
"link_to": "LMS Batch Membership",
|
||||||
"stats_filter": "{\"published\":[\"=\",1]}",
|
"stats_filter": "{\"member_type\":[\"=\",\"Student\"]}",
|
||||||
"type": "DocType"
|
"type": "DocType"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "Orange",
|
"color": "Blue",
|
||||||
"doc_view": "List",
|
"doc_view": "List",
|
||||||
"format": "{} Completed",
|
"format": "{} Completed",
|
||||||
"label": "Course Completed",
|
"label": "Course Completed",
|
||||||
@@ -172,13 +172,40 @@
|
|||||||
"stats_filter": "{\"progress\":[\"like\",\"%100%\"]}",
|
"stats_filter": "{\"progress\":[\"like\",\"%100%\"]}",
|
||||||
"type": "DocType"
|
"type": "DocType"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"color": "Cyan",
|
||||||
|
"doc_view": "List",
|
||||||
|
"format": "{} Passed",
|
||||||
|
"label": "Evaluation",
|
||||||
|
"link_to": "LMS Certificate Evaluation",
|
||||||
|
"stats_filter": "{\"status\":[\"=\",\"Pass\"]}",
|
||||||
|
"type": "DocType"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "Red",
|
||||||
|
"doc_view": "List",
|
||||||
|
"format": "{} Active",
|
||||||
|
"label": "Users",
|
||||||
|
"link_to": "User",
|
||||||
|
"stats_filter": "{\"enabled\":[\"=\",1]}",
|
||||||
|
"type": "DocType"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "Pink",
|
||||||
|
"doc_view": "List",
|
||||||
|
"format": "{} Granted",
|
||||||
|
"label": "Certificate",
|
||||||
|
"link_to": "LMS Certificate",
|
||||||
|
"stats_filter": "{\"name\":[\"is\",\"set\"]}",
|
||||||
|
"type": "DocType"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"color": "Green",
|
"color": "Green",
|
||||||
"doc_view": "List",
|
"doc_view": "List",
|
||||||
"format": "{} Enrolled",
|
"format": "{} Published",
|
||||||
"label": "Course Enrollments",
|
"label": "Course",
|
||||||
"link_to": "LMS Batch Membership",
|
"link_to": "LMS Course",
|
||||||
"stats_filter": "{\"member_type\":[\"=\",\"Student\"]}",
|
"stats_filter": "{\"published\":[\"=\",1]}",
|
||||||
"type": "DocType"
|
"type": "DocType"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -43,3 +43,4 @@ lms.patches.v0_0.skill_to_user_skill
|
|||||||
lms.patches.v0_0.rename_instructor_role
|
lms.patches.v0_0.rename_instructor_role
|
||||||
lms.patches.v0_0.change_course_creation_settings #12-12-2022
|
lms.patches.v0_0.change_course_creation_settings #12-12-2022
|
||||||
lms.patches.v0_0.check_onboarding_status #21-12-2022
|
lms.patches.v0_0.check_onboarding_status #21-12-2022
|
||||||
|
lms.patches.v0_0.assignment_file_type
|
||||||
|
|||||||
10
lms/patches/v0_0/assignment_file_type.py
Normal file
10
lms/patches/v0_0/assignment_file_type.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
assignment_lessons = frappe.get_all("Course Lesson", {
|
||||||
|
"file_type": ["is", "set"]
|
||||||
|
}, ["name", "question"])
|
||||||
|
|
||||||
|
for lesson in assignment_lessons:
|
||||||
|
if not lesson.question:
|
||||||
|
frappe.db.set_value("Course Lesson", lesson.name, "file_type", "")
|
||||||
@@ -948,6 +948,7 @@ pre {
|
|||||||
font-size: var(--text-base);
|
font-size: var(--text-base);
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search:focus {
|
.search:focus {
|
||||||
@@ -1472,10 +1473,6 @@ pre {
|
|||||||
border-spacing: 1rem 0.5rem;
|
border-spacing: 1rem 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachments-parent {
|
|
||||||
color: var(--text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
li {
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,12 @@ frappe.ready(() => {
|
|||||||
$("#search-modal").on("hidden.bs.modal", () => {
|
$("#search-modal").on("hidden.bs.modal", () => {
|
||||||
hide_search_bar();
|
hide_search_bar();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).keydown(function(e) {
|
||||||
|
if ((e.metaKey || e.ctrlKey) && e.key == "k") {
|
||||||
|
show_search_bar(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const search_course = (e) => {
|
const search_course = (e) => {
|
||||||
|
|||||||
@@ -191,8 +191,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<label class="preview" for="preview">
|
<label class="preview" for="preview">
|
||||||
<input {% if lesson.include_in_preview %} checked {% endif %} type="checkbox" id="preview">
|
<input {% if lesson.include_in_preview %} checked {% endif %} type="checkbox" id="preview">
|
||||||
{{ _("Show preview of this lesson to Guest users.") }}
|
{{ _("Show preview of this lesson to Guest users.") }}
|
||||||
|
|||||||
@@ -184,18 +184,13 @@ const quiz_summary = (e = undefined) => {
|
|||||||
results: localStorage.getItem(quiz_name),
|
results: localStorage.getItem(quiz_name),
|
||||||
},
|
},
|
||||||
callback: (data) => {
|
callback: (data) => {
|
||||||
let message =
|
|
||||||
data.message == total_questions
|
|
||||||
? __("Excellent Work 👏")
|
|
||||||
: __("Better luck next time");
|
|
||||||
$(".question").addClass("hide");
|
$(".question").addClass("hide");
|
||||||
$("#summary").addClass("hide");
|
$("#summary").addClass("hide");
|
||||||
$("#quiz-form")
|
$("#quiz-form")
|
||||||
.parent()
|
.parent()
|
||||||
.prepend(
|
.prepend(
|
||||||
`<div class="text-center summary">
|
`<div class="summary">
|
||||||
<h2> ${message} </h2>
|
<div class="font-weight-bold"> ${__("Score")}: ${data.message}/${total_questions} </div>
|
||||||
<div class="font-weight-bold"> ${data.message}/${total_questions} </div>
|
|
||||||
</div>`
|
</div>`
|
||||||
);
|
);
|
||||||
$("#try-again").removeClass("hide");
|
$("#try-again").removeClass("hide");
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
{{ quiz.name }}
|
{{ quiz.name }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="btn btn-secondary btn-sm copy-quiz-id" data-name="'{{ quiz.name }}'">
|
<a class="btn btn-secondary btn-sm copy-quiz-id" data-name="{{ quiz.name }}">
|
||||||
{{ _("Copy Quiz ID") }}
|
{{ _("Copy Quiz ID") }}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -231,7 +231,7 @@
|
|||||||
<!-- Save -->
|
<!-- Save -->
|
||||||
{% macro Save(course) %}
|
{% macro Save(course) %}
|
||||||
{% if course.edit_mode %}
|
{% if course.edit_mode %}
|
||||||
<div class="my-4">
|
<div class="mt-4 mb-16">
|
||||||
<button class="btn btn-primary btn-md btn-save-course">
|
<button class="btn btn-primary btn-md btn-save-course">
|
||||||
{{ _("Save Course Details") }}
|
{{ _("Save Course Details") }}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user