summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authoradityacp2020-12-16 16:48:40 +0530
committeradityacp2020-12-16 16:48:40 +0530
commit6945328e7a3e5cb23bfa16376c0a4a976f586f6c (patch)
treee7384e3697ad82e064ebad736fcef92d6eeb6e27 /yaksh
parent90dcfde792e3d0bb902b30f5a884c51825c7a815 (diff)
downloadonline_test-6945328e7a3e5cb23bfa16376c0a4a976f586f6c.tar.gz
online_test-6945328e7a3e5cb23bfa16376c0a4a976f586f6c.tar.bz2
online_test-6945328e7a3e5cb23bfa16376c0a4a976f586f6c.zip
Fix collapse in question statistics
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/templates/yaksh/statistics_question.html31
1 files changed, 14 insertions, 17 deletions
diff --git a/yaksh/templates/yaksh/statistics_question.html b/yaksh/templates/yaksh/statistics_question.html
index 52c29d3..5983835 100644
--- a/yaksh/templates/yaksh/statistics_question.html
+++ b/yaksh/templates/yaksh/statistics_question.html
@@ -20,13 +20,16 @@
{% if question_stats %}
<p><b>Total number of participants: {{ total }}</b></p>
<table class="table table-responsive-sm">
- <tr class="bg-light yakshred"><th>Question</th><th></th><th>Type</th><th>Total</th><th>Answered Correctly</th></tr>
+ <tr class="bg-light yakshred"><th>Question</th><th>Type</th><th>Total</th><th>Answered Correctly</th></tr>
{% for question, value in question_stats.items %}
<tr>
- <td width="45%">{{ question.summary }}
+ <td style="width: 45%">
+ <a href="#collapse_question_{{question.id}}" data-toggle="collapse">
+ <i class="fa fa-plus"></i>&nbsp;{{ question.summary }}</a>
<div class="collapse" id="collapse_question_{{question.id}}">
<br>
- <div class="card card-body">
+ <div class="card">
+ <div class="card-body">
<strong>
Summary:
</strong>
@@ -53,33 +56,27 @@
</p>
{% if question.type in 'mcq mcc' %}
<strong>
- Test Cases:
+ Options:
</strong>
<p>
<ol>
{% for tc in question.testcase_set.all %}
- <li>
- {{ tc.mcqtestcase.options }}
- {% if tc.mcqtestcase.correct %}
- <span class="badge badge-primary">Correct</span>
- {% endif %}
- </li>
+ <li>
+ {{ tc.mcqtestcase.options|safe }}
+ {% if tc.mcqtestcase.correct %}
+ <span class="badge badge-success">Correct</span>
+ {% endif %}
+ </li>
{% endfor %}
</ol>
</p>
{% endif %}
+ </div>
</div>
</div>
</td>
- <td>
- <button class="btn btn-outline-primary" type="button" data-toggle="collapse" data-target="#collapse_question_{{question.id}}" aria-expanded="false" aria-controls="collapseExample">
- <i class="fa fa-angle-down"></i>&nbsp;More
- </button>
- </td>
<td>{{ question.type }}</td>
<td>{{value.1}}</td><td>{{ value.0 }} ({% widthratio value.0 value.1 100 %}%)</td>
-
-
</tr>
{% endfor %}
</table>