diff options
author | adityacp | 2020-03-31 15:51:15 +0530 |
---|---|---|
committer | adityacp | 2020-03-31 15:51:15 +0530 |
commit | e6cce5b0ca4d616b7ff55c66f5d94376974fcc4c (patch) | |
tree | 7fe82f35e3fc1fe754494a5af61f4969f0d63f1d /yaksh/templates | |
parent | 541f3ec154f7c484a2a9105565117cefa4e15b18 (diff) | |
download | online_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.html | 8 |
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> |