From ae5e8ca5eb5d47afb14ba83e665de6f10e46bdac Mon Sep 17 00:00:00 2001
From: CruiseDevice
Date: Sun, 11 Nov 2018 01:03:11 +0530
Subject: Fix #525
- Categorize questions into objectives, blanks, upload and programming.
---
yaksh/templates/exam.html | 77 ++++++++++++++++++++++++++++++-----------------
1 file changed, 50 insertions(+), 27 deletions(-)
(limited to 'yaksh/templates')
diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html
index c452929..8c65e2b 100644
--- a/yaksh/templates/exam.html
+++ b/yaksh/templates/exam.html
@@ -1,9 +1,4 @@
{% extends "base.html" %}
-{% load custom_filters %}
-
-
-
-
{% load custom_filters %}
{% block nav %}
@@ -83,28 +78,56 @@
Question(s) left: {{ paper.questions_left }}
-
-
-
- {% for types in question_types %}
- {% get_questions_by_type paper.get_all_ordered_questions types as questions_by_type %}
- {% if types == "mcq" %} Single Correct Choice
- {% elif types == "mcc" %} Multiple Correct Choice
- {% elif types == "code" %} Programming
- {% elif types == "upload" %} Assignment Upload
- {% elif types == "integer" %} Integer Blanks
- {% elif types == "string" %} String Blanks
- {% elif types == "float" %} Float Blanks
- {% elif types == "arrange" %} Arranging Options
- {% endif %}
- --->
- {% for question in questions_by_type %} {{question.id}} {%endfor%}
-
- {%endfor%}
-
-
-
-
+
+
+
+ Category |
+ Question No. |
+
+
+
+ {% if index.objectives_index %}
+
+
+ Objectives:
+ |
+
+ {{index.objectives_index|join:", "}}
+ |
+
+ {% endif %}
+ {% if index.blanks_index %}
+
+
+ Blanks:
+ |
+
+ {{index.blanks_index|join:", "}}
+ |
+
+ {% endif %}
+ {% if index.upload_index %}
+
+
+ Upload:
+ |
+
+ {{index.upload_index|join:", "}}
+ |
+
+ {% endif %}
+ {% if index.programming_index %}
+
+
+ Programming:
+ |
+
+ {{index.programming_index|join:", "}}
+ |
+
+ {% endif %}
+
+
--
cgit
From a4c6a0a3c013f02c7cdd1d365a180ff6de121d6e Mon Sep 17 00:00:00 2001
From: CruiseDevice
Date: Fri, 4 Jan 2019 16:33:26 +0530
Subject: Code refactor and resolves requested changes.
---
yaksh/templates/exam.html | 40 +++++-----------------------------------
1 file changed, 5 insertions(+), 35 deletions(-)
(limited to 'yaksh/templates')
diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html
index 8c65e2b..29ad167 100644
--- a/yaksh/templates/exam.html
+++ b/yaksh/templates/exam.html
@@ -78,7 +78,7 @@
Question(s) left: {{ paper.questions_left }}
-
+
Category |
@@ -86,46 +86,16 @@
- {% if index.objectives_index %}
+ {% for category, question_number in paper.get_categorized_question_indices.items %}
- Objectives:
+ {{category}}
|
- {{index.objectives_index|join:", "}}
+ {{question_number| join:", "}}
|
- {% endif %}
- {% if index.blanks_index %}
-
-
- Blanks:
- |
-
- {{index.blanks_index|join:", "}}
- |
-
- {% endif %}
- {% if index.upload_index %}
-
-
- Upload:
- |
-
- {{index.upload_index|join:", "}}
- |
-
- {% endif %}
- {% if index.programming_index %}
-
-
- Programming:
- |
-
- {{index.programming_index|join:", "}}
- |
-
- {% endif %}
+ {% endfor %}
--
cgit