summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorPrabhu Ramachandran2018-01-19 22:28:17 +0530
committerGitHub2018-01-19 22:28:17 +0530
commitb78b5d0b46114caefca35e82c502d1f7598e8e59 (patch)
treea38164139a46eaad8696eaa12ef05f7f06f8358c /yaksh/templates
parent0824e419c6aa52bb9b788db1208dc2b70c104d8f (diff)
parent1ab5018b89f6d566471eba26b1d206b1b142b8a0 (diff)
downloadonline_test-b78b5d0b46114caefca35e82c502d1f7598e8e59.tar.gz
online_test-b78b5d0b46114caefca35e82c502d1f7598e8e59.tar.bz2
online_test-b78b5d0b46114caefca35e82c502d1f7598e8e59.zip
Merge pull request #426 from adityacp/fix_lessons_redirect
Fix lessons related bug
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;">