summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authoradityacp2020-03-31 15:51:15 +0530
committeradityacp2020-03-31 15:51:15 +0530
commite6cce5b0ca4d616b7ff55c66f5d94376974fcc4c (patch)
tree7fe82f35e3fc1fe754494a5af61f4969f0d63f1d /yaksh/templates
parent541f3ec154f7c484a2a9105565117cefa4e15b18 (diff)
downloadonline_test-e6cce5b0ca4d616b7ff55c66f5d94376974fcc4c.tar.gz
online_test-e6cce5b0ca4d616b7ff55c66f5d94376974fcc4c.tar.bz2
online_test-e6cce5b0ca4d616b7ff55c66f5d94376974fcc4c.zip
Change course_modules.html and views.py
- Get distinct courses in student dashboard - Add condition to check if question paper exists for a quiz in course modules
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/course_modules.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html
index 214f8c7..dd7b68d 100644
--- a/yaksh/templates/yaksh/course_modules.html
+++ b/yaksh/templates/yaksh/course_modules.html
@@ -128,9 +128,11 @@
View
</a>
{% else %}
- <a href="{% url 'yaksh:start_quiz' unit.quiz.questionpaper_set.get.id module.id course.id %}" class="btn btn-outline-info">
- View
- </a>
+ {% if unit.quiz.questionpaper_set.get %}
+ <a href="{% url 'yaksh:start_quiz' unit.quiz.questionpaper_set.get.id module.id course.id %}" class="btn btn-outline-info">
+ View
+ </a>
+ {% endif %}
{% endif %}
</td>
<td>