diff options
author | adityacp | 2017-04-19 12:57:10 +0530 |
---|---|---|
committer | adityacp | 2017-04-19 12:57:10 +0530 |
commit | 7a834136f3f88665605e8eee73be1f9e584e63a6 (patch) | |
tree | e9170035da1eb6f1f33bb39cc160834ba4f381a5 /yaksh/templates | |
parent | deaa592f01d5f270abca89c78620af1406fee67c (diff) | |
download | online_test-7a834136f3f88665605e8eee73be1f9e584e63a6.tar.gz online_test-7a834136f3f88665605e8eee73be1f9e584e63a6.tar.bz2 online_test-7a834136f3f88665605e8eee73be1f9e584e63a6.zip |
Change in Templates
- Add additional message for 404 error.
- Change grade user template to show label for correct/incorrect answer
- Change view answerpaper to provide download facility for students
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/404.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/grade_user.html | 13 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 8 |
3 files changed, 21 insertions, 4 deletions
diff --git a/yaksh/templates/404.html b/yaksh/templates/404.html index 8d43ec5..e9d99de 100644 --- a/yaksh/templates/404.html +++ b/yaksh/templates/404.html @@ -1,5 +1,7 @@ {% extends "base.html" %} {% block content %} -{{ exception }} +It seems that you have encountered an error +Type of Error - {{ exception }} +Please contact your administrator {% endblock %} diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 311af5c..1ac4757 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -46,7 +46,7 @@ </div> {% endif %} -{% if quiz_file_status %} +{% if has_quiz_assignments %} <a href="{{URL_ROOT}}/exam/manage/download/quiz_assignments/{{quiz_id}}/"> Download All Assignments</a> @@ -164,12 +164,21 @@ Status : <b style="color: green;"> Passed </b><br/> </div> <h5>Student answer: </h5> {% if question.type == "upload" %} - {% if user_file_status %} + {% if has_user_assignments %} <a href="{{URL_ROOT}}/exam/manage/download/user_assignment/{{question.id}}/{{data.user.id}}/{{paper.question_paper.quiz.id}}"> <div class="panel"> Assignment File for {{ data.user.get_full_name.title }} </div> </a> + {% with answers|last as answer%} + {% if answer.answer.correct %} + <div class="panel panel-success"> + <div class="panel-heading">Correct answer</div></div> + {% else %} + <div class="panel panel-danger"> + <div class="panel-heading">Incorrect Answer</div></div> + {% endif %} + {% endwith %} {% else %} <h5>No Assignment submitted by {{ data.user.get_full_name.title }}</h5> {% endif %} diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index 4520ac3..f4c8846 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -84,7 +84,13 @@ <h5><u>Student answer:</u></h5> <div class="well well-sm"> {{ answers.0.answer|safe }} - </div> + {% if question.type == "upload" and has_user_assignment %} + <a href="{{URL_ROOT}}/exam/download/user_assignment/{{question.id}}/{{data.user.id}}/{{paper.question_paper.quiz.id}}"> + <div class="panel"> + Assignment File for {{ data.user.get_full_name.title }} + </div></a> + {% endif %} + </div> </div> </div> {% else %} |