From eeaa835befca4bf91c5d439c1f4516ef804d0af2 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Thu, 10 Apr 2025 16:36:22 +0530 Subject: [PATCH] fix: redirect to course list from course from if user is not moderator and instructor --- frontend/src/components/Modals/Settings.vue | 14 ++ frontend/src/components/OnboardingBanner.vue | 159 ------------------ frontend/src/pages/CourseForm.vue | 6 +- .../doctype/lms_settings/lms_settings.json | 27 +-- 4 files changed, 31 insertions(+), 175 deletions(-) delete mode 100644 frontend/src/components/OnboardingBanner.vue diff --git a/frontend/src/components/Modals/Settings.vue b/frontend/src/components/Modals/Settings.vue index 290416a8..8f876e0f 100644 --- a/frontend/src/components/Modals/Settings.vue +++ b/frontend/src/components/Modals/Settings.vue @@ -350,6 +350,20 @@ const tabsStructure = computed(() => { }, ], }, + { + label: 'SEO', + icon: 'Search', + fields: [ + { + label: 'Meta Description', + name: 'meta_description', + type: 'textarea', + rows: 5, + description: + "This description will be shown on lists and pages that don't have meta description", + }, + ], + }, ], }, ] diff --git a/frontend/src/components/OnboardingBanner.vue b/frontend/src/components/OnboardingBanner.vue deleted file mode 100644 index b743ea82..00000000 --- a/frontend/src/components/OnboardingBanner.vue +++ /dev/null @@ -1,159 +0,0 @@ - - diff --git a/frontend/src/pages/CourseForm.vue b/frontend/src/pages/CourseForm.vue index 1117e649..2a2b2d07 100644 --- a/frontend/src/pages/CourseForm.vue +++ b/frontend/src/pages/CourseForm.vue @@ -310,11 +310,7 @@ const course = reactive({ }) onMounted(() => { - if ( - props.courseName == 'new' && - !user.data?.is_moderator && - !user.data?.is_instructor - ) { + if (!user.data?.is_moderator && !user.data?.is_instructor) { router.push({ name: 'Courses' }) } diff --git a/lms/lms/doctype/lms_settings/lms_settings.json b/lms/lms/doctype/lms_settings/lms_settings.json index 4c1fb733..c263bf5e 100644 --- a/lms/lms/doctype/lms_settings/lms_settings.json +++ b/lms/lms/doctype/lms_settings/lms_settings.json @@ -8,7 +8,6 @@ "general_tab", "default_home", "send_calendar_invite_for_evaluations", - "is_onboarding_complete", "column_break_zdel", "allow_guest_access", "enable_learning_paths", @@ -60,7 +59,9 @@ "batch_confirmation_template", "column_break_uwsp", "assignment_submission_template", - "payment_reminder_template" + "payment_reminder_template", + "seo_tab", + "meta_description" ], "fields": [ { @@ -107,13 +108,6 @@ "fieldtype": "Check", "label": "Identify User Persona" }, - { - "default": "0", - "fieldname": "is_onboarding_complete", - "fieldtype": "Check", - "label": "Is Onboarding Complete", - "read_only": 1 - }, { "default": "0", "fieldname": "default_home", @@ -372,14 +366,25 @@ "fieldname": "disable_signup", "fieldtype": "Check", "label": "Disable Signup" + }, + { + "fieldname": "seo_tab", + "fieldtype": "Tab Break", + "label": "SEO" + }, + { + "description": "This description will be shown on lists and pages without meta description", + "fieldname": "meta_description", + "fieldtype": "Small Text", + "label": "Meta Description" } ], "grid_page_length": 50, "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-04-07 18:05:52.000651", - "modified_by": "Administrator", + "modified": "2025-04-10 16:17:00.658698", + "modified_by": "sayali@frappe.io", "module": "LMS", "name": "LMS Settings", "owner": "Administrator",