diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 1 | ||||
-rw-r--r-- | yaksh/templates/yaksh/grade_user.html | 13 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 9 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 24 |
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 ... #} |