From 3e99577401725a8110c90e9033c0c5175139bda4 Mon Sep 17 00:00:00 2001 From: pateljannat Date: Tue, 29 Jun 2021 15:15:49 +0530 Subject: [PATCH] feat: lms workspace --- community/lms/doctype/lesson/lesson.js | 44 ++++++- community/lms/doctype/lesson/lesson.json | 15 ++- community/lms/workspace/lms/lms.json | 160 +++++++++++++++++++++++ 3 files changed, 215 insertions(+), 4 deletions(-) create mode 100644 community/lms/workspace/lms/lms.json diff --git a/community/lms/doctype/lesson/lesson.js b/community/lms/doctype/lesson/lesson.js index 54865506..bac10995 100644 --- a/community/lms/doctype/lesson/lesson.js +++ b/community/lms/doctype/lesson/lesson.js @@ -2,7 +2,47 @@ // For license information, please see license.txt frappe.ui.form.on('Lesson', { - // refresh: function(frm) { + setup: function (frm) { + frm.trigger('setup_help'); + }, + setup_help(frm) { + frm.get_field('help').html(` +

You can add some more additional content to the lesson using a special syntax. The table below mentions all types of dynamic content that you can add to the lessons and the syntax for the same.

+
+
+ Content Type +
+
+ Syntax +
+
- // } +
+
+ YouTube Video +
+
+ {{ YouTubeVideo("unique_embed_id") }} +
+
+ +
+
+ Exercise +
+
+ {{ Exercise("exercise_name") }} +
+
+ +
+
+ Quiz +
+
+ {{ Quiz("lms_quiz_name") }} +
+
+`); + } }); diff --git a/community/lms/doctype/lesson/lesson.json b/community/lms/doctype/lesson/lesson.json index 582596de..d2671804 100644 --- a/community/lms/doctype/lesson/lesson.json +++ b/community/lms/doctype/lesson/lesson.json @@ -13,7 +13,9 @@ "index_", "index_label", "section_break_6", - "body" + "body", + "help_section", + "help" ], "fields": [ { @@ -60,11 +62,20 @@ { "fieldname": "column_break_4", "fieldtype": "Column Break" + }, + { + "fieldname": "help_section", + "fieldtype": "Section Break", + "label": "Help" + }, + { + "fieldname": "help", + "fieldtype": "HTML" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-06-23 17:59:52.946515", + "modified": "2021-06-29 13:34:49.077363", "modified_by": "Administrator", "module": "LMS", "name": "Lesson", diff --git a/community/lms/workspace/lms/lms.json b/community/lms/workspace/lms/lms.json new file mode 100644 index 00000000..6b109a52 --- /dev/null +++ b/community/lms/workspace/lms/lms.json @@ -0,0 +1,160 @@ +{ + "category": "Modules", + "charts": [], + "creation": "2021-06-29 13:05:28.741459", + "developer_mode_only": 0, + "disable_user_customization": 0, + "docstatus": 0, + "doctype": "Workspace", + "extends_another_page": 0, + "hide_custom": 0, + "icon": "education", + "idx": 0, + "is_default": 0, + "is_standard": 1, + "label": "LMS", + "links": [ + { + "hidden": 0, + "is_query_report": 0, + "label": "LMS", + "link_type": "DocType", + "onboard": 0, + "type": "Card Break" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "LMS Course", + "link_to": "LMS Course", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "LMS Batch", + "link_to": "LMS Batch", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "LMS Batch Membership", + "link_to": "LMS Batch Membership", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "LMS Course Mentor Mapping", + "link_to": "LMS Course Mentor Mapping", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Content", + "link_type": "DocType", + "onboard": 0, + "type": "Card Break" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Chapter", + "link_to": "Chapter", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Lesson", + "link_to": "Lesson", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Exercise", + "link_to": "Exercise", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Exercise Submission", + "link_to": "Exercise Submission", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "LMS Quiz", + "link_to": "LMS Quiz", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "LMS Quiz Submission", + "link_to": "LMS Quiz Submission", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + } + ], + "modified": "2021-06-29 15:11:07.324651", + "modified_by": "Administrator", + "module": "LMS", + "name": "LMS", + "owner": "Administrator", + "pin_to_bottom": 0, + "pin_to_top": 1, + "shortcuts": [ + { + "color": "#29CD42", + "doc_view": "List", + "format": "{} Published", + "label": "Courses", + "link_to": "LMS Course", + "stats_filter": "{\"is_published\": 1}", + "type": "DocType" + }, + { + "color": "#29CD42", + "doc_view": "List", + "format": "{} Active ", + "label": "Batches", + "link_to": "LMS Batch", + "stats_filter": "{\"status\": \"Active\"}", + "type": "DocType" + }, + { + "color": "#39E4A5", + "doc_view": "List", + "format": "{} Students", + "label": "Memberships", + "link_to": "LMS Batch Membership", + "stats_filter": "{\"member_type\": \"Student\"}", + "type": "DocType" + } + ] +} \ No newline at end of file