From dbacd863cfe3294a1f10f326710c65cfb591c6b2 Mon Sep 17 00:00:00 2001 From: mahesh Date: Thu, 5 Oct 2017 01:00:15 +0530 Subject: Update grade user UI --- yaksh/templates/yaksh/grade_user.html | 22 +++++++++++++++++++--- yaksh/views.py | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 52f319c..2038210 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -9,6 +9,14 @@ {% block script %} + + {% endblock script %} {% if course_details %} @@ -108,17 +116,25 @@ Status : Passed
{% if paper.answers.count %}

Report


- +
+ + + + + + {% for question, answers in paper.get_question_answers.items %} {% with answers|last as answer %} - + + {% endwith %} {% endfor %} +
Question Id Questions Marks Obtained
{{ question.summary }}{{question.id}}{{ question.summary }} {{ answer.answer.marks }}
@@ -135,7 +151,7 @@ Status : Passed
{% for question, answers in paper.get_question_answers.items %}
-
+
Details: {{forloop.counter}}. {{ question.summary }} Mark(s): {{ question.points }} diff --git a/yaksh/views.py b/yaksh/views.py index c4ddcd1..6abfa2b 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -597,7 +597,7 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None): else: user_answer = request.POST.get('answer') if not user_answer: - msg = "Please submit a valid option or code" + msg = "Please submit a valid answer." return show_question( request, current_question, paper, notification=msg ) -- cgit