From bd8c2c653a06e29dcf7a1a0103f7735f46f0c488 Mon Sep 17 00:00:00 2001 From: adityacp Date: Fri, 31 Mar 2017 16:37:07 +0530 Subject: Change in templates and js and urls - Add urls to download quiz assignments in urls.p - Catch Http404 exception message in 404.html template - Add download assignment links for quiz in grade_user.html - Fix javascript validation in add_question.js --- yaksh/static/yaksh/js/add_question.js | 3 +- yaksh/templates/404.html | 2 +- yaksh/templates/yaksh/grade_user.html | 60 +++++++++++++++++++++-------------- yaksh/urls.py | 4 +++ 4 files changed, 42 insertions(+), 27 deletions(-) (limited to 'yaksh') diff --git a/yaksh/static/yaksh/js/add_question.js b/yaksh/static/yaksh/js/add_question.js index 05752b4..5bec8c6 100644 --- a/yaksh/static/yaksh/js/add_question.js +++ b/yaksh/static/yaksh/js/add_question.js @@ -122,9 +122,8 @@ function textareaformat() }); document.getElementById('my').innerHTML = document.getElementById('id_description').value ; - if (document.getElementById('id_grade_assignment_upload').checked || - document.getElementById('id_type').val() == 'upload'){ + document.getElementById('id_type').value == 'upload'){ $("#id_grade_assignment_upload").prop("disabled", false); } else{ diff --git a/yaksh/templates/404.html b/yaksh/templates/404.html index 7d33dd3..8d43ec5 100644 --- a/yaksh/templates/404.html +++ b/yaksh/templates/404.html @@ -1,5 +1,5 @@ {% extends "base.html" %} {% block content %} -The requested page does not exist. +{{ exception }} {% endblock %} diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 1cb1f99..69c03c9 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -46,7 +46,11 @@ {% endif %} +{% if quiz_file_status %} + + Download All Assignments +{% endif %}
Attempt Number: {{paper.attempt_number}}
-
Questions correctly answered: {{ paper.get_answered_str }}
Total attempts at questions: {{ paper.answers.count }}
Marks obtained: {{ paper.marks_obtained }}
@@ -95,7 +97,6 @@ Status : Failed
Status : Passed
{% endif %}
{{ err }}
{{ ans.answer.answer.strip|safe }}
{% endif %}
- {% for err in ans.error_list %}
- {{ err }}
{{ ans.answer.answer.strip|safe }}
{% endif %}
-