diff --git a/lms/lms/doctype/lms_settings/lms_settings.json b/lms/lms/doctype/lms_settings/lms_settings.json index 13b98a9f8..abfbb361f 100644 --- a/lms/lms/doctype/lms_settings/lms_settings.json +++ b/lms/lms/doctype/lms_settings/lms_settings.json @@ -17,17 +17,15 @@ "section_break_szgq", "send_calendar_invite_for_evaluations", "batch_confirmation_template", - "column_break_2", "allow_student_progress", - "payment_section", - "razorpay_key", - "razorpay_secret", - "apply_gst", - "column_break_cfcv", - "default_currency", - "show_usd_equivalent", - "apply_rounding", - "exception_country", + "column_break_2", + "show_dashboard", + "show_courses", + "show_students", + "show_assessments", + "show_live_class", + "show_discussions", + "show_emails", "signup_settings_tab", "signup_settings_section", "terms_of_use", @@ -42,7 +40,17 @@ "mentor_request_tab", "mentor_request_section", "mentor_request_creation", - "mentor_request_status_update" + "mentor_request_status_update", + "payment_settings_tab", + "payment_section", + "razorpay_key", + "razorpay_secret", + "apply_gst", + "column_break_cfcv", + "default_currency", + "show_usd_equivalent", + "apply_rounding", + "exception_country" ], "fields": [ { @@ -71,7 +79,8 @@ }, { "fieldname": "column_break_2", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "label": "Show Tab in Batch" }, { "fieldname": "search_placeholder", @@ -177,7 +186,7 @@ { "fieldname": "section_break_szgq", "fieldtype": "Section Break", - "label": "Batch Settings" + "label": "Class Settings" }, { "fieldname": "signup_settings_tab", @@ -199,8 +208,7 @@ }, { "fieldname": "payment_section", - "fieldtype": "Section Break", - "label": "Payment" + "fieldtype": "Section Break" }, { "fieldname": "default_currency", @@ -261,12 +269,59 @@ "fieldtype": "Link", "label": "Batch Confirmation Template", "options": "Email Template" + }, + { + "default": "1", + "fieldname": "show_courses", + "fieldtype": "Check", + "label": "Courses" + }, + { + "default": "1", + "fieldname": "show_students", + "fieldtype": "Check", + "label": "Students" + }, + { + "default": "1", + "fieldname": "show_assessments", + "fieldtype": "Check", + "label": "Assessments" + }, + { + "default": "1", + "fieldname": "show_live_class", + "fieldtype": "Check", + "label": "Live Class" + }, + { + "default": "1", + "fieldname": "show_discussions", + "fieldtype": "Check", + "label": "Discussions" + }, + { + "default": "1", + "fieldname": "show_emails", + "fieldtype": "Check", + "label": "Emails" + }, + { + "fieldname": "payment_settings_tab", + "fieldtype": "Tab Break", + "label": "Payment Settings" + }, + { + "default": "1", + "fieldname": "show_dashboard", + "fieldtype": "Check", + "label": "Dashboard" } ], "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2023-10-09 17:27:28.615355", + "modified": "2023-10-30 16:42:58.994359", "modified_by": "Administrator", "module": "LMS", "name": "LMS Settings", diff --git a/lms/patches.txt b/lms/patches.txt index 1eaa79d8c..7a6fba082 100644 --- a/lms/patches.txt +++ b/lms/patches.txt @@ -1,3 +1,4 @@ +[pre_model_sync] community.patches.set_email_preferences community.patches.change_name_for_community_members community.patches.save_abbr_for_community_members @@ -76,4 +77,7 @@ lms.patches.v1_0.mark_confirmation_for_batch_students lms.patches.v1_0.create_quiz_questions lms.patches.v1_0.add_default_marks #16-10-2023 lms.patches.v1_0.add_certificate_template #26-10-2023 -lms.patches.v1_0.create_batch_source \ No newline at end of file +lms.patches.v1_0.create_batch_source + +[post_model_sync] +lms.patches.v1_0.batch_tabs_settings \ No newline at end of file diff --git a/lms/patches/v1_0/batch_tabs_settings.py b/lms/patches/v1_0/batch_tabs_settings.py new file mode 100644 index 000000000..3fec83297 --- /dev/null +++ b/lms/patches/v1_0/batch_tabs_settings.py @@ -0,0 +1,16 @@ +import frappe + + +def execute(): + fields = [ + "show_dashboard", + "show_courses", + "show_students", + "show_emails", + "show_assessments", + "show_discussions", + "show_live_class", + ] + + for field in fields: + frappe.db.set_single_value("LMS Settings", field, 1) diff --git a/lms/patches/v1_0/create_batch_source.py b/lms/patches/v1_0/create_batch_source.py index 5c70da3de..c6c8f54b2 100644 --- a/lms/patches/v1_0/create_batch_source.py +++ b/lms/patches/v1_0/create_batch_source.py @@ -1,5 +1,7 @@ +import frappe from lms.install import create_batch_source def execute(): + frappe.reload_doc("lms", "doctype", "lms_source") create_batch_source() diff --git a/lms/www/batches/batch.html b/lms/www/batches/batch.html index cda893029..0183f5f57 100644 --- a/lms/www/batches/batch.html +++ b/lms/www/batches/batch.html @@ -88,8 +88,7 @@