summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/grade_user.html12
-rw-r--r--yaksh/templates/yaksh/monitor.html7
-rw-r--r--yaksh/templates/yaksh/user_data.html15
3 files changed, 26 insertions, 8 deletions
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index f0d9520..dd05670 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -27,11 +27,16 @@ Institute: {{ data.profile.institute }} <br/>
{% for paper in data.papers %}
+{% if forloop.counter == 2 and data.questionpaperid %}
+<hr>
+<u><h2> Previous attempts </h2></u>
+{% endif %}
{{ paper.total_marks }}
<h2> Quiz: {{ paper.question_paper.quiz.description }} </h2>
<p>
+Attempt Number: {{ paper.attempt_number }}<br/>
Questions correctly answered: {{ paper.get_answered_str }} <br/>
Total attempts at questions: {{ paper.answers.count }} <br/>
Marks obtained: {{ paper.get_total_marks }} <br/>
@@ -56,7 +61,12 @@ Start time: {{ paper.start_time }} <br/>
<h3> Answers </h3><br>
<form name=frm id="q{{ paper.quiz.id }}_form"
- action="{{URL_ROOT}}/exam/manage/gradeuser/{{data.user.username}}/" method="post">
+ {% if data.questionpaperid %}
+ action="{{URL_ROOT}}/exam/manage/gradeuser/{{data.user.username}}/{{data.questionpaperid}}/"
+ {% else %}
+ action="{{URL_ROOT}}/exam/manage/gradeuser/{{data.user.username}}/"
+ {% endif %}
+ method="post">
{% csrf_token %}
{% for question, answers in paper.get_question_answers.items %}
diff --git a/yaksh/templates/yaksh/monitor.html b/yaksh/templates/yaksh/monitor.html
index 7df0569..ecb8b42 100644
--- a/yaksh/templates/yaksh/monitor.html
+++ b/yaksh/templates/yaksh/monitor.html
@@ -38,7 +38,6 @@
{% if quiz %}
{% if papers %}
-{# <p> Quiz: {{ quiz_name }}</p> #}
<p>Number of papers: {{ papers|length }} </p>
<table border="1" cellpadding="3">
<tr>
@@ -51,10 +50,10 @@
<th> Attempts </th>
<th> Status </th>
</tr>
- {% for paper in papers %}
+ {% for paper in latest_attempts %}
<tr>
- <td> <a href="{{URL_ROOT}}/exam/manage/user_data/{{paper.user.username}}">{{ paper.user.get_full_name.title }}</a> </td>
- <td> <a href="{{URL_ROOT}}/exam/manage/user_data/{{paper.user.username}}">{{ paper.user.username }}</a> </td>
+ <td> <a href="{{URL_ROOT}}/exam/manage/user_data/{{paper.user.username}}/{{paper.question_paper.id}}">{{ paper.user.get_full_name.title }}</a> </td>
+ <td> {{ paper.user.username }} </td>
<td> {{ paper.user.profile.roll_number }} </td>
<td> {{ paper.user.profile.institute }} </td>
<td> {{ paper.get_answered_str }} </td>
diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html
index 61a3a97..3350763 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -21,15 +21,24 @@ Last login: {{ data.user.last_login }}
</p>
{% if data.papers %}
-<p><a href="{{URL_ROOT}}/exam/manage/gradeuser/{{ data.user.username }}/">
+{% if data.questionpaperid %}
+<p><a href="{{URL_ROOT}}/exam/manage/gradeuser/{{ data.user.username }}/{{ data.questionpaperid }}">
Grade/correct paper</a>
</p>
+{% else %}
+<p><a href="{{URL_ROOT}}/exam/manage/gradeuser/{{ data.user.username }}">
+ Grade/correct paper</a>
+{% endif %}
{% for paper in data.papers %}
-
-<h2> Quiz: {{ paper.quiz.description }} </h2>
+{% if forloop.counter == 2 and data.questionpaperid %}
+<hr>
+<U><h2> Previous attempts </h2></U>
+{% endif %}
+<h2> Quiz: {{ paper.question_paper.quiz.description }} </h2>
<p>
+Attempt Number: {{ paper.attempt_number }}<br/>
Questions correctly answered: {{ paper.get_answered_str }} <br/>
Total attempts at questions: {{ paper.answers.count }} <br/>
Marks obtained: {{ paper.get_total_marks }} <br/>