From 91bbe10495b637a83eb7cb76bdcd14cd353f275a Mon Sep 17 00:00:00 2001 From: scmmishra Date: Thu, 18 Oct 2018 16:19:33 +0530 Subject: [PATCH] LMS: More changes to the web view --- erpnext/www/lms/course.html | 11 ++++++----- erpnext/www/lms/course.py | 2 +- erpnext/www/lms/templates/includes/article.html | 4 ---- erpnext/www/lms/templates/includes/quiz.html | 13 ++++--------- erpnext/www/lms/templates/includes/video.html | 2 -- 5 files changed, 11 insertions(+), 21 deletions(-) diff --git a/erpnext/www/lms/course.html b/erpnext/www/lms/course.html index 9896b017aa..11b134dc2c 100644 --- a/erpnext/www/lms/course.html +++ b/erpnext/www/lms/course.html @@ -6,10 +6,10 @@ {% endblock %} {% block content %} -
- {% with content = current_content, next_content = next_content, course_name = course_name, program_name = program_name %} - {% include "www/lms/templates/includes/" + content_type.lower() + ".html" %} - {% endwith %} +
+ +{% include "www/lms/templates/includes/" + content_type.lower() + ".html" %} +
{% endblock %} \ No newline at end of file diff --git a/erpnext/www/lms/course.py b/erpnext/www/lms/course.py index 9e874273ee..a05725e436 100644 --- a/erpnext/www/lms/course.py +++ b/erpnext/www/lms/course.py @@ -17,7 +17,7 @@ def get_context(context): current_content = frappe.get_doc(content_type, content_name) # Saving context variables for Jinja - context.current_content = current_content + context.content = current_content context.course_name = course_name context.program_name = program_name context.content_type = content_type diff --git a/erpnext/www/lms/templates/includes/article.html b/erpnext/www/lms/templates/includes/article.html index 15835b816f..88634bf14a 100644 --- a/erpnext/www/lms/templates/includes/article.html +++ b/erpnext/www/lms/templates/includes/article.html @@ -8,9 +8,7 @@
- {% with next_content = next_content, course_name = course_name, program_name = program_name %} {% include "www/lms/templates/includes/lms-nav.html" %} - {% endwith %}

@@ -22,9 +20,7 @@ {{ content.content }}
- {% with next_content = next_content, course_name = course_name, program_name = program_name %} {% include "www/lms/templates/includes/lms-nav.html" %} - {% endwith %}
Report a diff --git a/erpnext/www/lms/templates/includes/quiz.html b/erpnext/www/lms/templates/includes/quiz.html index 8d20a26f01..6f3a58edc8 100644 --- a/erpnext/www/lms/templates/includes/quiz.html +++ b/erpnext/www/lms/templates/includes/quiz.html @@ -18,14 +18,14 @@ {% endmacro %}
- diff --git a/erpnext/www/lms/templates/includes/video.html b/erpnext/www/lms/templates/includes/video.html index e3ddacb54f..e9d4894b96 100644 --- a/erpnext/www/lms/templates/includes/video.html +++ b/erpnext/www/lms/templates/includes/video.html @@ -12,9 +12,7 @@
- {% with next_content = next_content, course_name = course_name, program_name = program_name %} {% include "www/lms/templates/includes/lms-nav.html" %} - {% endwith %}