From 75ad128912176b3ee60c1139ee5db01737328fd6 Mon Sep 17 00:00:00 2001 From: scmmishra Date: Mon, 29 Oct 2018 12:30:19 +0530 Subject: [PATCH] Added LMS Settings --- .../course_activity/course_activity.json | 8 +- .../education_settings.json | 122 +++++++++++++++++- .../doctype/quiz_activity/quiz_activity.json | 6 +- erpnext/education/utils.py | 2 - erpnext/www/lms/index.html | 11 +- erpnext/www/lms/index.py | 3 +- erpnext/www/lms/program.html | 4 +- 7 files changed, 134 insertions(+), 22 deletions(-) diff --git a/erpnext/education/doctype/course_activity/course_activity.json b/erpnext/education/doctype/course_activity/course_activity.json index e071d6143d..853bd46588 100644 --- a/erpnext/education/doctype/course_activity/course_activity.json +++ b/erpnext/education/doctype/course_activity/course_activity.json @@ -62,7 +62,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 0, "label": "Course", "length": 0, @@ -96,7 +96,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 0, "label": "Student", "length": 0, @@ -162,7 +162,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 0, "label": "Content", "length": 0, @@ -224,7 +224,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-10-24 11:48:22.659476", + "modified": "2018-10-25 20:30:34.573440", "modified_by": "Administrator", "module": "Education", "name": "Course Activity", diff --git a/erpnext/education/doctype/education_settings/education_settings.json b/erpnext/education/doctype/education_settings/education_settings.json index c1eaa11284..dd5376fe74 100644 --- a/erpnext/education/doctype/education_settings/education_settings.json +++ b/erpnext/education/doctype/education_settings/education_settings.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -14,6 +15,7 @@ "fields": [ { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -41,10 +43,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -72,10 +76,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -102,10 +108,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -131,10 +139,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -162,10 +172,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -193,10 +205,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -225,10 +239,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -254,10 +270,12 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, "unique": 0 }, { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -286,6 +304,103 @@ "reqd": 0, "search_index": 0, "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "web_academy_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": "Web Academy 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, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "portal_title", + "fieldtype": "Data", + "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 Title", + "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, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "description", + "fieldtype": "Small Text", + "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": "Description", + "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 } ], @@ -299,7 +414,7 @@ "issingle": 1, "istable": 0, "max_attachments": 0, - "modified": "2018-07-26 04:43:35.406690", + "modified": "2018-10-25 18:55:25.257146", "modified_by": "Administrator", "module": "Education", "name": "Education Settings", @@ -308,7 +423,6 @@ "permissions": [ { "amend": 0, - "apply_user_permissions": 0, "cancel": 0, "create": 1, "delete": 1, @@ -328,7 +442,6 @@ }, { "amend": 0, - "apply_user_permissions": 0, "cancel": 0, "create": 1, "delete": 1, @@ -355,5 +468,6 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1, - "track_seen": 0 + "track_seen": 0, + "track_views": 0 } \ No newline at end of file diff --git a/erpnext/education/doctype/quiz_activity/quiz_activity.json b/erpnext/education/doctype/quiz_activity/quiz_activity.json index cf2fde3457..f2aeea130f 100644 --- a/erpnext/education/doctype/quiz_activity/quiz_activity.json +++ b/erpnext/education/doctype/quiz_activity/quiz_activity.json @@ -265,12 +265,12 @@ "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, - "read_only": 0, + "read_only": 1, "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, - "set_only_once": 1, + "set_only_once": 0, "translatable": 0, "unique": 0 }, @@ -413,7 +413,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-10-24 11:55:47.168571", + "modified": "2018-10-25 20:29:08.305410", "modified_by": "Administrator", "module": "Education", "name": "Quiz Activity", diff --git a/erpnext/education/utils.py b/erpnext/education/utils.py index f298362fe3..9d57f66e5e 100644 --- a/erpnext/education/utils.py +++ b/erpnext/education/utils.py @@ -180,7 +180,5 @@ def mark_course_complete(course): enrollment.save() pass except: - import traceback - traceback.print_exc() frappe.throw("The user is not enrolled for the course {course}".format(course=course)) return None \ No newline at end of file diff --git a/erpnext/www/lms/index.html b/erpnext/www/lms/index.html index c39ee6ea65..560d70d0cd 100644 --- a/erpnext/www/lms/index.html +++ b/erpnext/www/lms/index.html @@ -1,5 +1,5 @@ {% extends "frappe_theme/templates/base.html" %} -{% block title %}ERPNext Academy{% endblock %} +{% block title %}{{settings.portal_title}}{% endblock %} {% from "templates/includes/media.html" import media %} @@ -29,22 +29,21 @@ -

Become an ERPNext Expert

+

{{settings.portal_title}}

- A platform for enterpreneurs, developers and implementors to learn the world's leading 100% Open - Source ERP

+ {{settings.description}}

- Enroll Now + Explore Courses

Featured Programs

-

Master ERPNext with our Expert Learning Paths

+

Master Engineering

{% for program in featured %} {{ featured_card(program.program_name, program.description, program.hero_image, program.program_code) }} {% endfor %} diff --git a/erpnext/www/lms/index.py b/erpnext/www/lms/index.py index 1bba69f470..a586b40741 100644 --- a/erpnext/www/lms/index.py +++ b/erpnext/www/lms/index.py @@ -3,4 +3,5 @@ import frappe import erpnext.education.utils as utils def get_context(context): - context.featured = utils.get_featured_programs() \ No newline at end of file + context.featured = utils.get_featured_programs() + context.settings = frappe.get_doc("Education Settings") \ No newline at end of file diff --git a/erpnext/www/lms/program.html b/erpnext/www/lms/program.html index bee013672c..44727df794 100644 --- a/erpnext/www/lms/program.html +++ b/erpnext/www/lms/program.html @@ -38,14 +38,14 @@

{{ program.description }}

- Continue with Course 2 + Continue Learning

Courses

-

Master ERPNext with our Expert Learning Paths

+

Curated Courses and Content

{% for course_item in course_list %} {{ course_card(course_item) }} {% endfor %}