diff options
author | maheshgudi | 2017-01-22 00:20:31 +0530 |
---|---|---|
committer | maheshgudi | 2017-01-22 00:38:15 +0530 |
commit | f276141ce8a30448026c5ed27622ef5b94fbc809 (patch) | |
tree | 220244effba9931c329482f47c4b1ace1f214417 /yaksh | |
parent | e8f752650a63c0bc50dd67c2fedf24444f20fcae (diff) | |
download | online_test-f276141ce8a30448026c5ed27622ef5b94fbc809.tar.gz online_test-f276141ce8a30448026c5ed27622ef5b94fbc809.tar.bz2 online_test-f276141ce8a30448026c5ed27622ef5b94fbc809.zip |
rectified monitor answerpaper view. Changed mcqfield from charfield to textfield.
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/models.py | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/grade_user.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 23 |
3 files changed, 14 insertions, 13 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 652545d..b888ddc 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1185,7 +1185,7 @@ class StdIOBasedTestCase(TestCase): class McqTestCase(TestCase): - options = models.CharField(max_length=100) + options = models.TextField(default=None) correct = models.BooleanField(default=False) def get_field_value(self): diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index b2ee7bc..1de9420 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -151,7 +151,7 @@ Status : <b style="color: green;"> Passed </b><br/> {% for ans in answers %} {% if ans.answer.correct %} <div class="panel panel-success"> - <div class="panel-heading">Correct: + <div class="panel-heading">Correct answer: {% else %} <div class="panel panel-danger"> <div class="panel-heading">Error: diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index 9cc2372..e4b3767 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -84,36 +84,37 @@ User IP address: {{ paper.user_ip }} </div> </div> {% if question.type == "mcq" or question.type == "mcc" %} - {% if "Correct answer" in answers.0.error %} + {% if "Correct answer" in answers.0.error_list %} <div class="panel panel-success"> {% else %} <div class="panel panel-danger"> {% endif %} <div class="panel-heading"> - Autocheck: {{ answers.0.error }} + Autocheck: {{ answers.0.error_list.0 }} </div> <div class="panel-body"> <h5><u>Student answer:</u></h5> - <pre><code>{{forloop.counter}}. {{ answers.0 }}</code></pre> + <pre><code>{{forloop.counter}}. {{ answers.0.answer }}</code></pre> </div> </div> {% else %} <h5>Student answer: </h5> {% for answer in answers %} {% if not answer.skipped %} - {% if answer.correct %} + {% if answer.answer.correct %} <div class="panel panel-success"> + <div class="panel-heading">Correct answer {% else %} <div class="panel panel-danger"> - {% endif %} - <div class="panel-heading"> - {% for error in error %} - <div class="panel-body"> - <pre><code>{{ error }}</code></pre> - </div> + <div class="panel-heading">Error + + {% for error in answer.error_list %} + <div><pre><code>{{ error }}</code></pre></div> {% endfor %} + {% endif %} + </div> - <div class="panel-body"><pre><code>{{ answer.answer.strip }}</code></pre></div> + <div class="panel-body"><pre><code>{{ answer.answer.answer.strip }}</code></pre></div> </div> {% endif %} {% endfor %} |