fix: course page

This commit is contained in:
pateljannat
2021-08-20 14:23:18 +05:30
parent eaec991f47
commit c6d3994383
9 changed files with 54 additions and 22 deletions

View File

@@ -16,9 +16,9 @@ def get_context(context):
redirect_to_course_list()
context.course = frappe.db.get_value("LMS Course", course_name,
["owner", "title", "name"], as_dict=True)
["instructor", "title", "name"], as_dict=True)
context.instructor = frappe.db.get_value("User", context.course.owner,
context.instructor = frappe.db.get_value("User", context.course.instructor,
["full_name", "username"], as_dict=True)
context.student = frappe.db.get_value("User", context.certificate.student,

View File

@@ -43,7 +43,7 @@
</div>
</div>
<div class="course-buttons">
{% if not course.disable_self_learning and not membership %}
{% if not course.disable_self_learning and not membership and not course.upcoming %}
<div class="button wide-button start-learning is-primary join-batch" data-course="{{ course.name | urlencode }}">
Start Learning
<img class="ml-2" src="/assets/community/icons/white-arrow.svg" />

View File