From 8006ffb4a5bd54aa960b24f1508d95844fa579de Mon Sep 17 00:00:00 2001
From: adityacp
Date: Mon, 15 Jan 2018 16:30:26 +0530
Subject: Change in template, test_views, urls and views
- Allow teacher to edit questionpaper for a quiz
- Add test to check if teacher is allowed to edit questionpaper for a quiz
---
yaksh/templates/yaksh/add_quiz.html | 1 +
1 file changed, 1 insertion(+)
(limited to 'yaksh/templates')
diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html
index d3705e3..bfd8aa1 100644
--- a/yaksh/templates/yaksh/add_quiz.html
+++ b/yaksh/templates/yaksh/add_quiz.html
@@ -38,6 +38,7 @@
{% if quiz_id and course_id %}
You can check the quiz by attempting it in the following modes:
+ View Question Paper
User Mode
--
cgit
From bfc3f08d5da08f774e76aa169a50f8e7847ff6ed Mon Sep 17 00:00:00 2001
From: adityacp
Date: Fri, 19 Jan 2018 15:58:06 +0530
Subject: Change in views and templates
- Add active field for exercise form
- Fix views test case for creating exercise
- Show question paper for exercise
---
yaksh/templates/yaksh/add_exercise.html | 46 +++++++++++++++++++++++++--------
yaksh/templates/yaksh/add_quiz.html | 44 ++++++++++++++++---------------
2 files changed, 58 insertions(+), 32 deletions(-)
(limited to 'yaksh/templates')
diff --git a/yaksh/templates/yaksh/add_exercise.html b/yaksh/templates/yaksh/add_exercise.html
index dac35d4..77e3ee8 100644
--- a/yaksh/templates/yaksh/add_exercise.html
+++ b/yaksh/templates/yaksh/add_exercise.html
@@ -14,17 +14,41 @@
{% block content %}
+{% if exercise and course_id %}
+ {% if exercise.questionpaper_set.get.id %}
+
+ You can check the quiz by attempting it in the following modes:
+ View Question Paper
+ User Mode
+
+
+ God Mode
+
+ Help
+
+
+
+ User Mode: Attempt quiz the way normal users will attempt i.e. -
+
+ Quiz will have the same duration as that of the original quiz.
+ Quiz won't start if the course is inactive or the quiz time has expired.
+ You will be notified about quiz prerequisites.(You can still attempt the quiz though)
+
+
+ God Mode: Attempt quiz without any time or eligibilty constraints.
+
+ {% endif %}
+{% endif %}
{% endblock %}
diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html
index bfd8aa1..684f804 100644
--- a/yaksh/templates/yaksh/add_quiz.html
+++ b/yaksh/templates/yaksh/add_quiz.html
@@ -35,32 +35,34 @@
-{% if quiz_id and course_id %}
+{% if quiz and course_id %}
+ {% if quiz.questionpaper_set.get.id %}
You can check the quiz by attempting it in the following modes:
- View Question Paper
- User Mode
-
-
- God Mode
+ View Question Paper
+ User Mode
+
+
+ God Mode
Help
-
-
-
- User Mode: Attempt quiz the way normal users will attempt i.e. -
-
- Quiz will have the same duration as that of the original quiz.
- Quiz won't start if the course is inactive or the quiz time has expired.
- You will be notified about quiz prerequisites.(You can still attempt the quiz though)
-
-
- God Mode: Attempt quiz without any time or eligibilty constraints.
-
- {% endif %}
-
+
{% endblock %}
--
cgit