Merge branch 'main' of https://github.com/fossunited/community into username-validation
This commit is contained in:
@@ -47,10 +47,17 @@
|
||||
|
||||
|
||||
{% if membership or lesson.include_in_preview or is_instructor %}
|
||||
<div class="common-card-style lesson-content-card markdown-source">{{ lesson.render_html() }}</div>
|
||||
<div class="common-card-style lesson-content-card markdown-source">
|
||||
{% if is_instructor %}
|
||||
<small class="alert alert-secondary alert-dismissible">
|
||||
This lesson is not available for preview. As you are the Instructor of the course only you can see it.
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</small>
|
||||
{% endif %}
|
||||
{{ lesson.render_html() }}</div>
|
||||
{% else %}
|
||||
<div class="common-card-style lesson-content-card">
|
||||
<span>This lesson is not available for Preview. Please join the course to access this lesson. <a
|
||||
<span>This lesson is not available for Preview. Please join the course to access it. <a
|
||||
href="/courses/{{ course.name }}">Checkout Course Details.</a></span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -11,7 +11,7 @@ def get_context(context):
|
||||
}
|
||||
|
||||
def get_courses():
|
||||
course_names = frappe.get_all("LMS Course", filters={"is_published": True}, pluck="name")
|
||||
course_names = frappe.get_all("LMS Course", filters={"is_published": True}, order_by="upcoming", pluck="name")
|
||||
courses = []
|
||||
for course in course_names:
|
||||
courses.append(frappe.get_doc("LMS Course", course))
|
||||
|
||||
Reference in New Issue
Block a user