From 1e519cc43e39432b97cf4c053dff30df0f994145 Mon Sep 17 00:00:00 2001
From: ankitjavalkar
Date: Fri, 8 Jan 2021 10:46:59 +0530
Subject: Add check in show_video.html template to ensure that questionpaper
exists
---
yaksh/templates/yaksh/show_video.html | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
(limited to 'yaksh')
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" %}
-
- {% if status == "completed" %}
-
- {% else %}
-
- {% endif %}
- {{ unit.quiz.description }}
-
+ {% if unit.quiz.questionpaper_set.get.id %}
+
+ {% if status == "completed" %}
+
+ {% else %}
+
+ {% endif %}
+ {{ unit.quiz.description }}
+
+ {% endif %}
{% else %}
{% if status == "completed" %}
--
cgit