diff --git a/lms/lms/doctype/lms_quiz_submission/lms_quiz_submission.json b/lms/lms/doctype/lms_quiz_submission/lms_quiz_submission.json index 0bed54d0..887e115d 100644 --- a/lms/lms/doctype/lms_quiz_submission/lms_quiz_submission.json +++ b/lms/lms/doctype/lms_quiz_submission/lms_quiz_submission.json @@ -5,9 +5,10 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "member", "quiz", - "result", - "score" + "score", + "result" ], "fields": [ { @@ -29,11 +30,20 @@ "fieldtype": "Data", "in_list_view": 1, "label": "Score" + }, + { + "fieldname": "member", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Member", + "options": "User" } ], + "in_create": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2021-08-26 12:24:15.973829", + "modified": "2022-06-20 10:13:23.013802", "modified_by": "Administrator", "module": "LMS", "name": "LMS Quiz Submission", @@ -54,5 +64,6 @@ ], "sort_field": "modified", "sort_order": "DESC", + "states": [], "track_changes": 1 } \ No newline at end of file diff --git a/lms/lms/workspace/lms/lms.json b/lms/lms/workspace/lms/lms.json index ef310827..6baf3091 100644 --- a/lms/lms/workspace/lms/lms.json +++ b/lms/lms/workspace/lms/lms.json @@ -22,6 +22,16 @@ "onboard": 0, "type": "Card Break" }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Course", + "link_count": 0, + "link_to": "LMS Course", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, { "hidden": 0, "is_query_report": 0, @@ -52,6 +62,16 @@ "onboard": 0, "type": "Link" }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Quiz Submission", + "link_count": 0, + "link_to": "LMS Quiz Submission", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, { "hidden": 0, "is_query_report": 0, @@ -81,13 +101,14 @@ "type": "Link" } ], - "modified": "2022-03-28 16:21:13.704961", + "modified": "2022-06-20 09:46:31.407249", "modified_by": "Administrator", "module": "LMS", "name": "LMS", "owner": "Administrator", "parent_page": "", "public": 1, + "quick_lists": [], "roles": [], "sequence_id": 1.0, "shortcuts": [ diff --git a/lms/patches.txt b/lms/patches.txt index 67ba2b39..84a5fb0d 100644 --- a/lms/patches.txt +++ b/lms/patches.txt @@ -25,5 +25,6 @@ school.patches.v0_0.multiple_instructors #11-02-2022 school.patches.v0_0.set_course_in_lesson #21-03-2022 school.patches.v0_0.set_status_in_course #21-03-2022 lms.patches.v0_0.change_published_field_data #25-03-2022 -execute:frappe.delete_doc("Workspace", "School", ignore_missing=True, force=True) +execute:frappe.delete_doc("Workspace", "School", ignore_mi ssing=True, force=True) lms.patches.v0_0.move_certification_to_certificate +lms.patches.v0_0.quiz_submission_member diff --git a/lms/patches/v0_0/quiz_submission_member.py b/lms/patches/v0_0/quiz_submission_member.py new file mode 100644 index 00000000..02d3349b --- /dev/null +++ b/lms/patches/v0_0/quiz_submission_member.py @@ -0,0 +1,8 @@ +import frappe + +def execute(): + frappe.reload_doc("lms", "doctype", "lms_quiz_submission") + submissions = frappe.db.get_all("LMS Quiz Submission", fields=["name", "owner"]) + + for submission in submissions: + frappe.db.set_value("LMS Quiz Submission", submission.name, "member", submission.owner)