fix: discussions component visibility conditions

This commit is contained in:
Jannat Patel
2022-09-23 07:12:12 +05:30
parent 47e4175c9a
commit c9fd1f5252
2 changed files with 2 additions and 2 deletions

View File

@@ -33,7 +33,7 @@
</div> </div>
<div class="lesson-pagination-parent"> <div class="lesson-pagination-parent">
{{ LessonContent(lesson) }} {{ LessonContent(lesson) }}
{% if not lesson.edit_mode and course.staus == "Approved" and not course.upcoming %} {% if not lesson.edit_mode and course.status == "Approved" and not course.upcoming %}
{{ Discussions() }} {{ Discussions() }}
{% endif %} {% endif %}
</div> </div>

View File

@@ -9,7 +9,7 @@ def get_common_context(context):
batch_name = None batch_name = None
course = frappe.db.get_value("LMS Course", course = frappe.db.get_value("LMS Course",
frappe.form_dict["course"], ["name", "title", "video_link", "enable_certification"], as_dict=True) frappe.form_dict["course"], ["name", "title", "video_link", "enable_certification", "status"], as_dict=True)
if not course: if not course:
context.template = "www/404.html" context.template = "www/404.html"
return return