LMS: More changes to the web view
diff --git a/erpnext/www/lms/course.html b/erpnext/www/lms/course.html
index 9896b01..11b134d 100644
--- a/erpnext/www/lms/course.html
+++ b/erpnext/www/lms/course.html
@@ -6,10 +6,10 @@
<meta name="keywords" content="ERP Software, Cloud ERP, Open Source ERP, Accounting Software, Online ERP, Online Accounting, ERP for small business, Learn ERP, ERPNext Academy, Learn ERPNext, Learn Accounting" />
{% endblock %}
{% block content %}
-<div id="content-holder" data-type="{{ content_type }}" data-content="{{ current_content.name }}" data-course="{{ course_name }}" data-program="{{ program_name }}">
- {% 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 %}
+<div id="content-holder" data-type="{{ content_type }}" data-content="{{ content.name }}" data-course="{{ course_name }}" data-program="{{ program_name }}">
+
+{% include "www/lms/templates/includes/" + content_type.lower() + ".html" %}
+
</div>
<style>
.footer-message {
@@ -35,7 +35,8 @@
}
.quiz-section {
- padding-top: 0rem !important;
+ padding-top: 3rem !important;
+ padding-bottom: 0rem !important;
}
</style>
{% endblock %}
\ No newline at end of file
diff --git a/erpnext/www/lms/course.py b/erpnext/www/lms/course.py
index 9e87427..a05725e 100644
--- a/erpnext/www/lms/course.py
+++ b/erpnext/www/lms/course.py
@@ -17,7 +17,7 @@
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 15835b8..88634bf 100644
--- a/erpnext/www/lms/templates/includes/article.html
+++ b/erpnext/www/lms/templates/includes/article.html
@@ -8,9 +8,7 @@
</span>
</div>
<div class="col-md-4 text-right">
- {% with next_content = next_content, course_name = course_name, program_name = program_name %}
{% include "www/lms/templates/includes/lms-nav.html" %}
- {% endwith %}
</div>
</div>
<hr>
@@ -22,9 +20,7 @@
{{ content.content }}
</div>
<div class="text-right">
- {% with next_content = next_content, course_name = course_name, program_name = program_name %}
{% include "www/lms/templates/includes/lms-nav.html" %}
- {% endwith %}
</div>
<div class="mt-3 text-right">
<a class="text-muted" href="/report"><i class="octicon octicon-issue-opened" title="Report"></i> Report a
diff --git a/erpnext/www/lms/templates/includes/quiz.html b/erpnext/www/lms/templates/includes/quiz.html
index 8d20a26..6f3a58e 100644
--- a/erpnext/www/lms/templates/includes/quiz.html
+++ b/erpnext/www/lms/templates/includes/quiz.html
@@ -18,14 +18,14 @@
{% endmacro %}
<section class="quiz-section">
<div class='container'>
- <div class="mt-3 row">
+ <div class="row">
<div class="col-md-8">
- <h2>Quiz: {{ current_content.name }}</h2>
+ <h2>{{ content.title }}</h2>
</div>
</div>
<div class="content">
<hr>
- <form id="quiz" name="{{ current_content.name }}">
+ <form id="quiz" name="{{ content.name }}">
<div id="quiz-body">
{% for q in questions %}
{{ quiz(loop.index|str +". ", q) }}
@@ -41,12 +41,7 @@
<h3>Your Score: <span id="result"></span></h3>
</div>
<div class="col-md-4 text-right">
- <a class='btn btn-outline-secondary' href="#">Previous</a>
- {% if next_content != None %}
- <a class='btn btn-primary' href="/lms/course?program={{ program }}&course={{ course_name }}&content={{ next_content }}">Next</a>
- {% else %}
- <a class='btn btn-primary' href="/lms/program?program={{ program }}">Finish Course</a>
- {% endif %}
+ {% include "www/lms/templates/includes/lms-nav.html" %}
</div>
</div>
</div>
diff --git a/erpnext/www/lms/templates/includes/video.html b/erpnext/www/lms/templates/includes/video.html
index e3ddacb..e9d4894 100644
--- a/erpnext/www/lms/templates/includes/video.html
+++ b/erpnext/www/lms/templates/includes/video.html
@@ -12,9 +12,7 @@
</span>
</div>
<div class="col-md-4 text-right">
- {% with next_content = next_content, course_name = course_name, program_name = program_name %}
{% include "www/lms/templates/includes/lms-nav.html" %}
- {% endwith %}
</div>
</div>
<hr>