diff options
author | Palaparthy Adityachandra | 2021-02-08 09:37:05 +0530 |
---|---|---|
committer | GitHub | 2021-02-08 09:37:05 +0530 |
commit | 7448e1fa32f4e5af14a3af6b9196d6e1983edf55 (patch) | |
tree | 5716cac69314871dd5cc1556cbb6283beb65a1f5 /yaksh | |
parent | 9b9ebb227bbaafca3daf5485c3bbe0d948d3e843 (diff) | |
parent | 1e519cc43e39432b97cf4c053dff30df0f994145 (diff) | |
download | online_test-7448e1fa32f4e5af14a3af6b9196d6e1983edf55.tar.gz online_test-7448e1fa32f4e5af14a3af6b9196d6e1983edf55.tar.bz2 online_test-7448e1fa32f4e5af14a3af6b9196d6e1983edf55.zip |
Merge pull request #810 from ankitjavalkar/fix-qp-exist
Add check in show_video.html template to ensure that questionpaper exists
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/templates/yaksh/show_video.html | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html index dde178b..faa7735 100644 --- a/yaksh/templates/yaksh/show_video.html +++ b/yaksh/templates/yaksh/show_video.html @@ -55,14 +55,16 @@ {% for unit in module.get_learning_units %} {% get_unit_status course module unit user as status %} {% if unit.type == "quiz" %} - <a href="{% url 'yaksh:start_quiz' unit.quiz.questionpaper_set.get.id module.id course.id %}" class="list-group-item"> - {% if status == "completed" %} - <i class="fa fa-check-square"></i> - {% else %} - <i class="fa fa-square-o"></i> - {% endif %} - {{ unit.quiz.description }} - </a> + {% if unit.quiz.questionpaper_set.get.id %} + <a href="{% url 'yaksh:start_quiz' unit.quiz.questionpaper_set.get.id module.id course.id %}" class="list-group-item"> + {% if status == "completed" %} + <i class="fa fa-check-square"></i> + {% else %} + <i class="fa fa-square-o"></i> + {% endif %} + {{ unit.quiz.description }} + </a> + {% endif %} {% else %} <a href="{% url 'yaksh:show_lesson' unit.lesson.id module.id course.id %}" class="list-group-item"> {% if status == "completed" %} |