diff options
author | CruiseDevice | 2018-11-11 01:03:11 +0530 |
---|---|---|
committer | CruiseDevice | 2019-01-28 13:07:02 +0530 |
commit | ae5e8ca5eb5d47afb14ba83e665de6f10e46bdac (patch) | |
tree | 3a275aa025fc294dbee88fab3e354305378882c9 /yaksh/templates/exam.html | |
parent | 53e43a65f0b47557da035597f37b4ee9a9d5e290 (diff) | |
download | online_test-ae5e8ca5eb5d47afb14ba83e665de6f10e46bdac.tar.gz online_test-ae5e8ca5eb5d47afb14ba83e665de6f10e46bdac.tar.bz2 online_test-ae5e8ca5eb5d47afb14ba83e665de6f10e46bdac.zip |
Fix #525
- Categorize questions into objectives, blanks, upload and programming.
Diffstat (limited to 'yaksh/templates/exam.html')
-rw-r--r-- | yaksh/templates/exam.html | 77 |
1 files changed, 50 insertions, 27 deletions
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,10 +1,5 @@ {% extends "base.html" %} {% load custom_filters %} - - - - -{% load custom_filters %} {% block nav %} <div class="container-fluid yakshnav"> <nav class="navbar fixed-top navbar-expand-lg yakshheading yakshnav"> @@ -83,28 +78,56 @@ <p class="text-center">Question(s) left: <b>{{ paper.questions_left }}</b></p> </div> <br> - <div class=""> - <div class=""> - <div class=""> - {% 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 %} - ---> - <b> {% for question in questions_by_type %} {{question.id}} {%endfor%} </b> - <br> - {%endfor%} - </div> - </div> - </div> - + <table class = "table table-bordered table-sm"> + <thead> + <tr> + <th>Category</th> + <th>Question No.</th> + </tr> + </thead> + <tbody> + {% if index.objectives_index %} + <tr> + <td> + Objectives: + </td> + <td> + {{index.objectives_index|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 %} + </tbody> + </table> </div> <!--end of sidebar --> <a href="#sidebar" data-toggle="collapse" id="sidebaricon"><i class="fa fa-navicon fa-lg"></i></a> |