From 7a892b8c664a69bd054efc6c662281e839546b7d Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Tue, 7 Nov 2017 15:49:35 +0530 Subject: - Change function names and urls to 'preview_questionpaper' - Add snippet to the questionpaper preview --- yaksh/templates/yaksh/download_questionpaper.html | 38 -------------------- yaksh/templates/yaksh/preview_questionpaper.html | 42 +++++++++++++++++++++++ 2 files changed, 42 insertions(+), 38 deletions(-) delete mode 100644 yaksh/templates/yaksh/download_questionpaper.html create mode 100644 yaksh/templates/yaksh/preview_questionpaper.html (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/download_questionpaper.html b/yaksh/templates/yaksh/download_questionpaper.html deleted file mode 100644 index 8b04874..0000000 --- a/yaksh/templates/yaksh/download_questionpaper.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "base.html" %} - -{% block pagetitle %} Quiz: {{ paper.quiz.description }} {% endblock pagetitle %} - -{% block content %} -
-
-
Maximum Mark(s): {{ paper.total_marks }}
-
Total Time: {{ paper.quiz.duration }}
-
-
-
-
Instructions
-
- {{ paper.quiz.instructions|safe }} -
-
-{% for question in questions %} -
-
- {{forloop.counter}}. {{ question.summary }} - Mark(s): {{ question.points }} - -
-
-
Question:
{{ question.description|safe }} - {% if question.type == "mcq" or question.type == "mcc" %} -
Choices:
- {% for testcase in question.get_test_cases %} -
- {{ forloop.counter }}. {{ testcase.options|safe }} - {% endfor %} - {% endif %} - -
-
-{% endfor %} -{% endblock %} diff --git a/yaksh/templates/yaksh/preview_questionpaper.html b/yaksh/templates/yaksh/preview_questionpaper.html new file mode 100644 index 0000000..411e4a6 --- /dev/null +++ b/yaksh/templates/yaksh/preview_questionpaper.html @@ -0,0 +1,42 @@ +{% extends "base.html" %} + +{% block pagetitle %} Quiz: {{ paper.quiz.description }} {% endblock pagetitle %} + +{% block content %} +
+
+
Maximum Mark(s): {{ paper.total_marks }}
+
Total Time: {{ paper.quiz.duration }}
+
+
+
+
Instructions
+
+ {{ paper.quiz.instructions|safe }} +
+
+{% for question in questions %} +
+
+ {{forloop.counter}}. {{ question.summary }} + Mark(s): {{ question.points }} + +
+
+
Question:
{{ question.description|safe }} +
Answer:
+ {% if question.type == "code" %} +
{{ question.snippet }}
+ {% endif %} + {% if question.type == "mcq" or question.type == "mcc" %} +
Choices:
+ {% for testcase in question.get_test_cases %} +
+ {{ forloop.counter }}. {{ testcase.options|safe }} + {% endfor %} + {% endif %} + +
+
+{% endfor %} +{% endblock %} -- cgit