- You have opted to be notified for this course. You will receive an email when the course becomes available.
+ {{ _("You have opted to be notified for this course. You will receive an email when the course becomes available.") }}
+ {% if course.status == "Under Review" %}
+
+ {{ _("Your course is currently under review. Once the review is complete, the System Admins will publish it on the website.") }}
+
@@ -162,14 +174,13 @@
{% set lesson_index = get_lesson_index(membership.current_lesson) if membership and
membership.current_lesson
else '1.1' %}
-
{% if show_start_learing_cta %}
{{ _("Start Learning") }}
- {% elif is_instructor(course.name) and not course.is_published and status != "Ready for Review" %}
+ {% elif is_instructor(course.name) and not course.is_published and course.status != "Under Review" %}
{{ _("Submit for Review") }}
diff --git a/school/www/courses/course.js b/school/www/courses/course.js
index 66ae4c82..67447feb 100644
--- a/school/www/courses/course.js
+++ b/school/www/courses/course.js
@@ -274,6 +274,7 @@ const submit_for_review = (e) => {
Please add chapters and lessons to your course before you submit it for review.`));
} else if (data.message == "OK") {
frappe.msgprint(__("Your course has been submitted for review."))
+ window.location.reload();
}
}
})
diff --git a/school/www/courses/course.py b/school/www/courses/course.py
index 70818259..b8bfc35a 100644
--- a/school/www/courses/course.py
+++ b/school/www/courses/course.py
@@ -13,7 +13,7 @@ def get_context(context):
course = frappe.db.get_value("LMS Course", course_name,
["name", "title", "image", "short_introduction", "description", "is_published", "upcoming",
- "disable_self_learning", "video_link", "enable_certification"],
+ "disable_self_learning", "video_link", "enable_certification", "status"],
as_dict=True)
related_courses = frappe.get_all("Related Courses", {"parent": course.name}, ["course"])
@@ -33,7 +33,7 @@ def get_context(context):
if context.course.upcoming:
context.is_user_interested = get_user_interest(context.course.name)
context.restriction = check_profile_restriction()
- context.show_start_learing_cta = show_start_learing_cta(course, membership)
+ context.show_start_learing_cta = show_start_learing_cta(course, membership, context.restriction)
context.metatags = {
"title": course.title,
"image": course.image,
@@ -48,5 +48,5 @@ def get_user_interest(course):
"user": frappe.session.user
})
-def show_start_learing_cta(course, membership):
- return not course.disable_self_learning and not membership and not course.upcoming and not restriction.restrict and not is_instructor(course.name)
+def show_start_learing_cta(course, membership, restriction):
+ return not course.disable_self_learning and not membership and not course.upcoming and not restriction.get("restrict") and not is_instructor(course.name)
diff --git a/school/www/dashboard/index.html b/school/www/dashboard/index.html
index 23bf4ef7..c643915d 100644
--- a/school/www/dashboard/index.html
+++ b/school/www/dashboard/index.html
@@ -3,23 +3,32 @@
{% endblock %}
{% block content %}
+{% set portal_course_creation = frappe.db.get_single_value("LMS Settings", "portal_course_creation") %}