Merge branch 'main' of https://github.com/fossunited/community into username-validation

This commit is contained in:
Jannat Patel
2021-09-20 13:44:51 +05:30
15 changed files with 47 additions and 16 deletions

View File

@@ -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">&times;</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 %}

View File

@@ -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))