summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authormaheshgudi2017-01-18 03:26:21 +0530
committermaheshgudi2017-01-18 14:39:23 +0530
commit9d16d8342becd44092e9087b4953fecc7f3e0662 (patch)
tree93a034fe670d789e79d83875134b3164280fc1fd /yaksh/templates
parentf93527f83ff0b6d87cd9ffb10aac3cbb27d08b8a (diff)
downloadonline_test-9d16d8342becd44092e9087b4953fecc7f3e0662.tar.gz
online_test-9d16d8342becd44092e9087b4953fecc7f3e0662.tar.bz2
online_test-9d16d8342becd44092e9087b4953fecc7f3e0662.zip
students can see the correct option for MCQ/MCC questions in view_answerpaper
students can also see the test cases of a code question in view_answerpaper
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/grade_user.html9
-rw-r--r--yaksh/templates/yaksh/user_data.html10
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html23
3 files changed, 35 insertions, 7 deletions
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index ec8c244..2ab5047 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -130,7 +130,14 @@ Status : <b style="color: green;"> Passed </b><br/>
{% if question.type == "mcq" or question.type == "mcc" %}
<h5> <u>Choices:</u></h5>
{% for testcase in question.get_test_cases %}
- <br/><strong>{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ {% if testcase.correct %}
+ <br/><strong><mark style="background-color:#4cff00">
+ {{ forloop.counter }}. {{ testcase.options|safe }}
+ </mark></strong>
+ {% else %}
+ <br/><strong>
+ {{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ {% endif %}
{% endfor %}
{% else %}
<h5> <u>Test cases: </u></h5>
diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html
index 9c11dd9..27c5237 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -66,7 +66,15 @@ User IP address: {{ paper.user_ip }}
{% if question.type == "mcq" or question.type == "mcc" %}
<h5> <u>Choices:</u></h5>
{% for testcase in question.get_test_cases %}
- <br/><strong>{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ {% if testcase.correct %}
+ <br/><strong><mark style="background-color:#4cff00">
+ {{ forloop.counter }}. {{ testcase.options|safe }}
+ </mark>
+ </strong>
+ {% else %}
+ <br/><strong>
+ {{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ {% endif %}
{% endfor %}
{% else %}
<h5> <u>Test cases: </u></h5>
diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html
index cd607dd..172444f 100644
--- a/yaksh/templates/yaksh/view_answerpaper.html
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -40,11 +40,24 @@
<div class="panel-body">
<h5><u>Question:</u></h5> <strong>{{ question.description|safe }}</strong>
{% if question.type == "mcq" or question.type == "mcc" %}
- <h5> <u>Choices:</u></h5>
- {% for testcase in question.get_test_cases %}
- <br/><strong>{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
- {% endfor %}
- {%endif%}
+ <h5> <u>Choices:</u></h5>
+ {% for testcase in question.get_test_cases %}
+ {% if testcase.correct %}
+ <br/><strong><mark style="background-color:#4cff00">
+ {{ forloop.counter }}. {{ testcase.options|safe }}
+ </mark>
+ </strong>
+ {% else %}
+ <br/><strong>
+ {{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ {% endif %}
+ {% endfor %}
+ {% else %}
+ <h5> <u>Test cases: </u></h5>
+ {% for testcase in question.get_test_cases %}
+ <br/><strong>{{ forloop.counter }}. {{ testcase }}</strong>
+ {% endfor %}
+ {% endif %}
</div>
</div>