summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authoradityacp2018-01-16 16:23:42 +0530
committeradityacp2018-01-16 16:23:42 +0530
commit67d4f84d3274ffce449073d1209f29943cfccf06 (patch)
treeb764c59efbcc7a54095dcbd2dbdd1656446d8b94 /yaksh/templates
parent1445358b4ee548edd16a8d42026b080b7d92a0c4 (diff)
downloadonline_test-67d4f84d3274ffce449073d1209f29943cfccf06.tar.gz
online_test-67d4f84d3274ffce449073d1209f29943cfccf06.tar.bz2
online_test-67d4f84d3274ffce449073d1209f29943cfccf06.zip
Change template, urls.py, views.py
- Change show_video.html to empty module - Add condition to check if module is completed for the corresponding unit
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/show_video.html19
1 files changed, 15 insertions, 4 deletions
diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html
index f4b59ac..17f9d86 100644
--- a/yaksh/templates/yaksh/show_video.html
+++ b/yaksh/templates/yaksh/show_video.html
@@ -64,6 +64,7 @@
{% if learning_module.html_data%}
<hr>
{% endif %}
+ {% if learning_module.get_learning_units %}
<center><h4>Following are the units in this modules</h4></center>
<table class="table">
<tr>
@@ -95,13 +96,23 @@
</tr>
{% endfor %}
</table>
+ {% else %}
+ <center><h3>No Lessons/Quizzes Found</h3></center>
+ {% endif %}
</div>
</div>
<div style="text-align: center;">
- <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}/{{first_unit.id}}/1" class="btn btn-info">Start
- <span class="glyphicon glyphicon-chevron-right">
- </span>
- </a>
+ {% if first_unit %}
+ <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}/{{first_unit.id}}/1" class="btn btn-info">Start
+ <span class="glyphicon glyphicon-chevron-right">
+ </span>
+ </a>
+ {% else %}
+ <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}" class="btn btn-info">Next
+ <span class="glyphicon glyphicon-chevron-right">
+ </span>
+ </a>
+ {% endif %}
</div>
{% else %}
<div class="panel panel-default" style="border: none; box-shadow: none;">