diff --git a/lms/lms/utils.py b/lms/lms/utils.py index 57a1f906..93e811c8 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -387,3 +387,7 @@ def first_lesson_exists(course): return False return True + +def redirect_to_courses_list(): + frappe.local.flags.redirect_location = "/courses" + raise frappe.Redirect diff --git a/lms/lms/widgets/CourseOutline.html b/lms/lms/widgets/CourseOutline.html index c231ffea..f15622b4 100644 --- a/lms/lms/widgets/CourseOutline.html +++ b/lms/lms/widgets/CourseOutline.html @@ -13,7 +13,7 @@ {% if get_chapters(course.name) | length %} {% for chapter in get_chapters(course.name) %} -