summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorPrabhu Ramachandran2017-01-18 16:13:53 +0530
committerGitHub2017-01-18 16:13:53 +0530
commite75d5e67bc129c0d55ce94496ef4636c80dba0eb (patch)
tree9e610b5436165458be16ae7aa45857b292643bd8 /yaksh/templates
parentc3205b84ebd1796d98e140952802cdc0baad19a7 (diff)
parent1f66352c1f26eb0688ae0884781e6a6a66d43b18 (diff)
downloadonline_test-e75d5e67bc129c0d55ce94496ef4636c80dba0eb.tar.gz
online_test-e75d5e67bc129c0d55ce94496ef4636c80dba0eb.tar.bz2
online_test-e75d5e67bc129c0d55ce94496ef4636c80dba0eb.zip
Merge pull request #181 from maheshgudi/mcq_bugfix
Course CSV Download and Correct option(s) in view answerpaper
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/courses.html1
-rw-r--r--yaksh/templates/yaksh/grade_user.html13
-rw-r--r--yaksh/templates/yaksh/user_data.html9
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html24
4 files changed, 37 insertions, 10 deletions
diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html
index ecd3a13..b7cc2e1 100644
--- a/yaksh/templates/yaksh/courses.html
+++ b/yaksh/templates/yaksh/courses.html
@@ -79,6 +79,7 @@
</div>
<br/>
<button class="btn btn-primary pull-right"type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/addquiz/{{course.id}}/");'>Add New Quiz</button>
+ <p><a href="{{URL_ROOT}}/exam/manage/courses/download_course_csv/{{course.id}}">Download CSV</a></p>
</div>
</div>
<br><br>
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index ec8c244..b2ee7bc 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -101,7 +101,7 @@ Status : <b style="color: green;"> Passed </b><br/>
{% with answers|last as answer %}
<tr>
<td>{{ question.id }}</td>
- <td>{{ answer.marks }}</td>
+ <td>{{ answer.answer.marks }}</td>
</tr>
{% endwith %}
{% endfor %}
@@ -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>{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ <span class="label label-success"> Correct </span>
+ {% else %}
+ <br/><strong>
+ {{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ {% endif %}
{% endfor %}
{% else %}
<h5> <u>Test cases: </u></h5>
@@ -159,7 +166,7 @@ Status : <b style="color: green;"> Passed </b><br/>
{% with answers|last as answer %}
Marks: <input id="q{{ question.id }}" type="text"
name="q{{ question.id }}_marks" size="4"
- value="{{ answer.0.marks }}"><br><br>
+ value="{{ answer.answer.marks }}"><br><br>
{% endwith %}
<hr/>
{% endfor %} {# for question, answers ... #}
diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html
index 9c11dd9..9cc2372 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -66,7 +66,14 @@ 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>{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ <span class="label label-success"> Correct </span>
+ {% 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..5240278 100644
--- a/yaksh/templates/yaksh/view_answerpaper.html
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -40,11 +40,23 @@
<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>{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ <span class="label label-success"> Correct</span>
+ {% 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>
@@ -78,7 +90,7 @@
{% endfor %}
{% endif %}
{% with answers|last as answer %}
- <p><em><mark>Obtained Marks: {{answer.marks}}</mark></em> </p>
+ <p><em><mark>Obtained Marks: {{answer.answer.marks}}</mark></em> </p>
{% endwith %}
<hr>
{% endfor %} {# for question, answers ... #}