diff options
author | ankitjavalkar | 2020-08-26 17:12:45 +0530 |
---|---|---|
committer | ankitjavalkar | 2020-08-26 17:12:45 +0530 |
commit | d8b7314c38a0a1ae4e0cfea9399e943b94366c5b (patch) | |
tree | 6434974072db341e7463290808936b4a70485751 /yaksh/templates | |
parent | 5c0d64f8a100a74bda7f9160f2f33db7807c3171 (diff) | |
download | online_test-d8b7314c38a0a1ae4e0cfea9399e943b94366c5b.tar.gz online_test-d8b7314c38a0a1ae4e0cfea9399e943b94366c5b.tar.bz2 online_test-d8b7314c38a0a1ae4e0cfea9399e943b94366c5b.zip |
Display question details
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/statistics_question.html | 107 |
1 files changed, 106 insertions, 1 deletions
diff --git a/yaksh/templates/yaksh/statistics_question.html b/yaksh/templates/yaksh/statistics_question.html index 606f5e9..9a54501 100644 --- a/yaksh/templates/yaksh/statistics_question.html +++ b/yaksh/templates/yaksh/statistics_question.html @@ -21,10 +21,115 @@ <table class="table table-bordered table-responsive-sm"> <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>{{ question.summary }}</td><td>{{ question.type }}</td><td>{{value.1}}</td><td>{{ value.0 }} ({% widthratio value.0 value.1 100 %}%)</td></tr> + <tr> + <td>{{ question.summary }} + <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapse_question_{{question.id}}" aria-expanded="false" aria-controls="collapseExample"> + More + </button> + <div class="collapse" id="collapse_question_{{question.id}}"> + <div class="card card-body" style="width: 18rem;"> + <strong> + Summary: + </strong> + <p> + {{ question.summary }} + </p> + <strong> + Description: + </strong> + <p> + {{ question.description }} + </p> + <strong> + Points: + </strong> + <p> + {{ question.points }} + </p> + <strong> + Type: + </strong> + <p> + {{ question.type }} + </p> + {% if question.type in 'mcq mcc' %} + <strong> + Test Cases: + </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> + {% endfor %} + </ol> + </p> + {% endif %} + </div> + </div> + </td> + <td>{{ question.type }}</td> + <td>{{value.1}}</td><td>{{ value.0 }} ({% widthratio value.0 value.1 100 %}%)</td> + + + </tr> {% endfor %} </table> {% endif %} + + <!-- The Modal --> + <div class="modal" id="question_detail_modal"> + <div class="modal-dialog"> + <div class="modal-content"> + + <!-- Modal Header --> + <div class="modal-header"> + <h4 class="modal-title">Question Details</h4> + <button type="button" class="close" data-dismiss="modal">×</button> + </div> + + <!-- Modal body --> + <div class="modal-body"> + <table> + <tr> + <td>Summary</td> + <td>{{ question.summary }}</td> + </tr> + <tr> + <td>Description</td> + <td>{{ question.description }}</td> + </tr> <tr> + <td>Type</td> + <td>{{ question.type }}</td> + </tr> <tr> + <td>Points</td> + <td>{{ question.points }}</td> + </tr> + <tr> + {% for tc in question.testcase_set.all %} + tc + {% endfor %} + <br><br> + </tr> + </table> + </div> + + <!-- Modal footer --> + <div class="modal-footer"> + <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button> + </div> + + </div> + </div> + </div> + + </div> + </div> + <!-- end Modal outer --> </div> </div> </div> |