diff --git a/lms/patches.txt b/lms/patches.txt index 01aa751c..5dd3d40e 100644 --- a/lms/patches.txt +++ b/lms/patches.txt @@ -24,3 +24,4 @@ execute:frappe.delete_doc("Custom Field", "User-verify_age", ignore_missing=True school.patches.v0_0.multiple_instructors #11-02-2022 school.patches.v0_0.set_course_in_lesson #21-03-2022 school.patches.v0_0.set_status_in_course #21-03-2022 +lms.patches.v0_0.change_published_field_data diff --git a/lms/patches/v0_0/change_published_field_data.py b/lms/patches/v0_0/change_published_field_data.py new file mode 100644 index 00000000..fc64639a --- /dev/null +++ b/lms/patches/v0_0/change_published_field_data.py @@ -0,0 +1,6 @@ +import frappe + +def execute(): + courses = frappe.get_all("LMS Course", fields=["name", "is_published"]) + for course in courses: + frappe.db.set_value("LMS Course", course.name, "published", course.is_published) diff --git a/lms/www/batch/learn.js b/lms/www/batch/learn.js index 536bf0be..4bde13fb 100644 --- a/lms/www/batch/learn.js +++ b/lms/www/batch/learn.js @@ -111,7 +111,7 @@ const mark_progress = (e) => { }); } else - move_to_next_lesson(e); + move_to_next_lesson(status, e); }; const change_progress_indicators = (status, e) => {