fix: ui issues

This commit is contained in:
pateljannat
2021-08-26 18:32:14 +05:30
parent 6965148e4e
commit ed91801769
7 changed files with 47 additions and 59 deletions

View File

@@ -8,7 +8,7 @@ from frappe.model.document import Document
from ...md import markdown_to_html, find_macros
class Lesson(Document):
def before_save(self):
def on_update(self):
dynamic_documents = ["Exercise", "Quiz"]
for section in dynamic_documents:
self.update_lesson_name_in_document(section)

View File

@@ -13,6 +13,8 @@
{
"fieldname": "quiz",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Quiz",
"options": "LMS Quiz"
},
@@ -25,12 +27,13 @@
{
"fieldname": "score",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Score"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-06-07 14:19:54.958989",
"modified": "2021-08-26 12:24:15.973829",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Quiz Submission",

View File

@@ -19,7 +19,7 @@
{% for lesson in course.get_lessons(chapter) %}
<div class="lesson-info{% if membership.current_lesson == lesson.name %} active-lesson {% endif %}">
<div class="lesson-info {% if membership.current_lesson == lesson.name %} active-lesson {% endif %}">
{% if membership or lesson.include_in_preview or is_instructor %}
<a class="lesson-links" href="{{ course.get_learn_url(lesson.number) }}{{course.query_parameter}}"
@@ -57,7 +57,7 @@
frappe.ready(() => {
expand_the_active_chapter();
$(".chapter-title").click((e) => {
$(".chapter-title").unbind().click((e) => {
rotate_chapter_icon(e);
});
@@ -103,7 +103,6 @@
}
var rotate_chapter_icon = (e) => {
e.preventDefault();
var icon = $(e.currentTarget).children(".chapter-icon");
if (icon.css("transform") == "none") {
icon.css("transform", "rotate(90deg)");
@@ -111,5 +110,4 @@
icon.css("transform", "none");
}
}
</script>

View File

@@ -3,7 +3,7 @@
<div class="course-home-headings">
Course Outline
</div>
<div class="coure-outline">
<div class="common-card-style course-outline">
{% for chapter in course.get_chapters() %}
{{ widgets.ChapterTeaser(index=loop.index, chapter=chapter, course=course, batch=batch, membership=membership) }}
{% endfor %}