summaryrefslogtreecommitdiff
path: root/yaksh/templates/exam.html
diff options
context:
space:
mode:
authorCruiseDevice2019-01-04 16:33:26 +0530
committerCruiseDevice2019-01-28 13:07:02 +0530
commita4c6a0a3c013f02c7cdd1d365a180ff6de121d6e (patch)
tree83055ac859ae88740790197fbf8db01352bbd1e9 /yaksh/templates/exam.html
parentf72b744db670d88c095200832a638b69f514f55c (diff)
downloadonline_test-a4c6a0a3c013f02c7cdd1d365a180ff6de121d6e.tar.gz
online_test-a4c6a0a3c013f02c7cdd1d365a180ff6de121d6e.tar.bz2
online_test-a4c6a0a3c013f02c7cdd1d365a180ff6de121d6e.zip
Code refactor and resolves requested changes.
Diffstat (limited to 'yaksh/templates/exam.html')
-rw-r--r--yaksh/templates/exam.html40
1 files changed, 5 insertions, 35 deletions
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 @@
<p class="text-center">Question(s) left: <b>{{ paper.questions_left }}</b></p>
</div>
<br>
- <table class = "table table-bordered table-sm">
+ <table class = "legend_table table-bordered table-sm">
<thead>
<tr>
<th>Category</th>
@@ -86,46 +86,16 @@
</tr>
</thead>
<tbody>
- {% if index.objectives_index %}
+ {% for category, question_number in paper.get_categorized_question_indices.items %}
<tr>
<td>
- Objectives:
+ {{category}}
</td>
<td>
- {{index.objectives_index|join:", "}}
+ {{question_number| join:", "}}
</td>
</tr>
- {% endif %}
- {% if index.blanks_index %}
- <tr>
- <td>
- Blanks:
- </td>
- <td>
- {{index.blanks_index|join:", "}}
- </td>
- </tr>
- {% endif %}
- {% if index.upload_index %}
- <tr>
- <td>
- Upload:
- </td>
- <td>
- {{index.upload_index|join:", "}}
- </td>
- </tr>
- {% endif %}
- {% if index.programming_index %}
- <tr>
- <td>
- Programming:
- </td>
- <td>
- {{index.programming_index|join:", "}}
- </td>
- </tr>
- {% endif %}
+ {% endfor %}
</tbody>
</table>
</div> <!--end of sidebar -->