LMS: More changes to the web view

This commit is contained in:
scmmishra 2018-10-18 16:19:33 +05:30 committed by Aditya Hase
parent 5569cbf82c
commit 91bbe10495
5 changed files with 11 additions and 21 deletions

View File

@ -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" /> <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 %} {% endblock %}
{% block content %} {% block content %}
<div id="content-holder" data-type="{{ content_type }}" data-content="{{ current_content.name }}" data-course="{{ course_name }}" data-program="{{ program_name }}"> <div id="content-holder" data-type="{{ content_type }}" data-content="{{ 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" %} {% include "www/lms/templates/includes/" + content_type.lower() + ".html" %}
{% endwith %}
</div> </div>
<style> <style>
.footer-message { .footer-message {
@ -35,7 +35,8 @@
} }
.quiz-section { .quiz-section {
padding-top: 0rem !important; padding-top: 3rem !important;
padding-bottom: 0rem !important;
} }
</style> </style>
{% endblock %} {% endblock %}

View File

@ -17,7 +17,7 @@ def get_context(context):
current_content = frappe.get_doc(content_type, content_name) current_content = frappe.get_doc(content_type, content_name)
# Saving context variables for Jinja # Saving context variables for Jinja
context.current_content = current_content context.content = current_content
context.course_name = course_name context.course_name = course_name
context.program_name = program_name context.program_name = program_name
context.content_type = content_type context.content_type = content_type

View File

@ -8,9 +8,7 @@
</span> </span>
</div> </div>
<div class="col-md-4 text-right"> <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" %} {% include "www/lms/templates/includes/lms-nav.html" %}
{% endwith %}
</div> </div>
</div> </div>
<hr> <hr>
@ -22,9 +20,7 @@
{{ content.content }} {{ content.content }}
</div> </div>
<div class="text-right"> <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" %} {% include "www/lms/templates/includes/lms-nav.html" %}
{% endwith %}
</div> </div>
<div class="mt-3 text-right"> <div class="mt-3 text-right">
<a class="text-muted" href="/report"><i class="octicon octicon-issue-opened" title="Report"></i> Report a <a class="text-muted" href="/report"><i class="octicon octicon-issue-opened" title="Report"></i> Report a

View File

@ -18,14 +18,14 @@
{% endmacro %} {% endmacro %}
<section class="quiz-section"> <section class="quiz-section">
<div class='container'> <div class='container'>
<div class="mt-3 row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
<h2>Quiz: {{ current_content.name }}</h2> <h2>{{ content.title }}</h2>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<hr> <hr>
<form id="quiz" name="{{ current_content.name }}"> <form id="quiz" name="{{ content.name }}">
<div id="quiz-body"> <div id="quiz-body">
{% for q in questions %} {% for q in questions %}
{{ quiz(loop.index|str +". ", q) }} {{ quiz(loop.index|str +". ", q) }}
@ -41,12 +41,7 @@
<h3>Your Score: <span id="result"></span></h3> <h3>Your Score: <span id="result"></span></h3>
</div> </div>
<div class="col-md-4 text-right"> <div class="col-md-4 text-right">
<a class='btn btn-outline-secondary' href="#">Previous</a> {% include "www/lms/templates/includes/lms-nav.html" %}
{% 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 %}
</div> </div>
</div> </div>
</div> </div>

View File

@ -12,9 +12,7 @@
</span> </span>
</div> </div>
<div class="col-md-4 text-right"> <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" %} {% include "www/lms/templates/includes/lms-nav.html" %}
{% endwith %}
</div> </div>
</div> </div>
<hr> <hr>