From 3866dee3e16501c6149db4ada162e2b2f88327a6 Mon Sep 17 00:00:00 2001 From: scmmishra Date: Tue, 26 Feb 2019 16:37:31 +0530 Subject: [PATCH] feat: Corse doctype --- erpnext/education/doctype/course/course.json | 112 +------------------ erpnext/education/doctype/course/course.py | 4 +- 2 files changed, 6 insertions(+), 110 deletions(-) diff --git a/erpnext/education/doctype/course/course.json b/erpnext/education/doctype/course/course.json index ca6f1a39c8..e0ed87ea2e 100644 --- a/erpnext/education/doctype/course/course.json +++ b/erpnext/education/doctype/course/course.json @@ -206,38 +206,6 @@ "translatable": 0, "unique": 0 }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "portal_settings_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Portal Settings", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, { "allow_bulk_edit": 0, "allow_in_quick_entry": 0, @@ -254,7 +222,6 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Course Details", "length": 0, "no_copy": 0, "permlevel": 0, @@ -277,7 +244,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "course_topic", + "fieldname": "topics", "fieldtype": "Table", "hidden": 0, "ignore_user_permissions": 0, @@ -286,7 +253,7 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Course Topic", + "label": "Topics", "length": 0, "no_copy": 0, "options": "Course Topic", @@ -335,39 +302,6 @@ "translatable": 0, "unique": 0 }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "fieldname": "is_published", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Is Published", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, { "allow_bulk_edit": 0, "allow_in_quick_entry": 0, @@ -478,7 +412,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2018-12-12 12:40:50.372457", + "modified": "2019-02-20 17:56:53.020550", "modified_by": "Administrator", "module": "Education", "name": "Course", @@ -517,45 +451,7 @@ "print": 1, "read": 1, "report": 1, - "role": "Instructor", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - }, - { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "LMS User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 0 - }, - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", + "role": "HR Manager", "set_user_permissions": 0, "share": 1, "submit": 0, diff --git a/erpnext/education/doctype/course/course.py b/erpnext/education/doctype/course/course.py index ec22ea37d6..c558f6f201 100644 --- a/erpnext/education/doctype/course/course.py +++ b/erpnext/education/doctype/course/course.py @@ -18,8 +18,8 @@ class Course(Document): total_weightage += criteria.weightage or 0 if total_weightage != 100: frappe.throw(_("Total Weightage of all Assessment Criteria must be 100%")) - - def get_contents_based_on_type(self): + + def get_contents_based_on_type(self): contents= self.get_contents() quiz_list = [item for item in contents if item.doctype=="Quiz"] content_list = [item for item in contents if item.doctype!="Quiz"]