diff options
author | prathamesh | 2016-02-18 17:48:16 +0530 |
---|---|---|
committer | prathamesh | 2016-02-18 17:48:16 +0530 |
commit | ce4732b65c378a38cac5a504a606872ab25918ec (patch) | |
tree | 53e15d2f377fa7008c1cc8576cc1e1a6348ed3e0 /yaksh/templates | |
parent | 712f0cc181efc2ae3d52f5ee3d180bc099f4b793 (diff) | |
download | online_test-ce4732b65c378a38cac5a504a606872ab25918ec.tar.gz online_test-ce4732b65c378a38cac5a504a606872ab25918ec.tar.bz2 online_test-ce4732b65c378a38cac5a504a606872ab25918ec.zip |
Monitor shows latest attempt of a student for a given quiz
User data is shown as per the question paper/quiz and not all together.
It also shows other attempts for the same question paper.
And then grade user interface is as per question paper if nagivated via
monitor interface.
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/grade_user.html | 12 | ||||
-rw-r--r-- | yaksh/templates/yaksh/monitor.html | 7 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 15 |
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/> |