feat: pages to navbar settings

This commit is contained in:
Jannat Patel
2022-12-12 13:31:11 +05:30
parent 424d35bf42
commit 0356b8e2d2
7 changed files with 59 additions and 50 deletions

View File

@@ -0,0 +1,6 @@
import frappe
def execute():
value = frappe.db.get_single_value("LMS Settings", "portal_course_creation")
if value == "Course Instructor Role":
frappe.db.set_value("LMS Settings", None, "portal_course_creation", "Course Creator Role")

View File

@@ -2,5 +2,8 @@ import frappe
def execute():
frappe.rename_doc("Role", "Course Instructor", "Instructor")
frappe.rename_doc("Role", "Course Moderator", "Moderator")
if frappe.db.exists("Role", "Course Instructor"):
frappe.rename_doc("Role", "Course Instructor", "Instructor")
if frappe.db.exists("Role", "Course Moderator"):
frappe.rename_doc("Role", "Course Moderator", "Moderator")

View File

@@ -4,5 +4,6 @@ import frappe
def execute():
frappe.reload_doc("lms", "doctype", "user_skill")
skills = frappe.get_all("Skill", pluck="name")
for skill in skills:
frappe.get_doc({"doctype": "User Skill", "skill": skill}).save()