diff --git a/lms/hooks.py b/lms/hooks.py index 6786785d..52a1a34f 100644 --- a/lms/hooks.py +++ b/lms/hooks.py @@ -172,7 +172,6 @@ website_route_rules = [ "to_route": "/classes/progress", }, {"from_route": "/assignments/", "to_route": "assignments/assignment"}, - {"from_route": "/quiz-result/", "to_route": "quiz_result/quiz_result"}, ] website_redirects = [ diff --git a/lms/lms/doctype/lms_quiz/lms_quiz.py b/lms/lms/doctype/lms_quiz/lms_quiz.py index 6ae83f8c..3b706ffd 100644 --- a/lms/lms/doctype/lms_quiz/lms_quiz.py +++ b/lms/lms/doctype/lms_quiz/lms_quiz.py @@ -77,7 +77,7 @@ def quiz_summary(quiz, results): result["question"] = frappe.db.get_value( "LMS Quiz Question", {"parent": quiz, "idx": result["question_index"]}, ["question"] ) - print(result) + for point in result["is_correct"]: correct = correct and point diff --git a/lms/public/js/html2canvas.js b/lms/public/js/html2canvas.js index d953dc83..e48005c7 100644 --- a/lms/public/js/html2canvas.js +++ b/lms/public/js/html2canvas.js @@ -6012,7 +6012,7 @@ if (isSelectElement(element)) { return new SelectElementContainer(context, element); } - if (isElement(element)) { + if (isTextareaElement(element)) { return new TextareaElementContainer(context, element); } if (isIFrameElement(element)) { diff --git a/lms/www/assignments/assignment.html b/lms/www/assignments/assignment.html index 5f682847..f319ba61 100644 --- a/lms/www/assignments/assignment.html +++ b/lms/www/assignments/assignment.html @@ -9,67 +9,70 @@
{{ _("Assignment Grading") }}
- {% set course_title = frappe.db.get_value("LMS Course", assignment.course, "title") %} - {% set lesson_title = frappe.db.get_value("Course Lesson", assignment.lesson, "title") %} - -
- -
-
-
- - -
-
- - -
-
- -
-
-
- - -
- -
- -
- -
- - - -
-
-
-
- -
- - -
-
- - -
- -
- - {{ _("Open Attachment") }} - - -
-
+ {{ AssignmentForm(assignment) }}
{% endblock %} + + +{% macro AssignmentForm(assignment) %} +{% set course_title = frappe.db.get_value("LMS Course", assignment.course, "title") %} +{% set lesson_title = frappe.db.get_value("Course Lesson", assignment.lesson, "title") %} + +
+ +
+
+
+ + +
+
+ + +
+
+ +
+
+
+ + +
+ +
+ +
+ +
+ + + +
+
+
+
+ +
+ + +
+
+
+ +
+ + {{ _("Open Attachment") }} + + +
+
+{% endmacro %} diff --git a/lms/www/assignments/assignment.py b/lms/www/assignments/assignment.py index b7c8094c..dbbd5509 100644 --- a/lms/www/assignments/assignment.py +++ b/lms/www/assignments/assignment.py @@ -6,8 +6,7 @@ from frappe import _ def get_context(context): context.no_cache = 1 assignment = frappe.form_dict["assignment"] - print("assignment") - print(assignment) + if not has_course_moderator_role(): message = "Only Moderators have access to this page." if frappe.session.user == "Guest": @@ -21,4 +20,3 @@ def get_context(context): ["assignment", "comments", "status", "name", "member_name", "course", "lesson"], as_dict=True, ) - print("call twice")