diff options
Diffstat (limited to 'templates/exam/grade_user.html')
-rw-r--r-- | templates/exam/grade_user.html | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/templates/exam/grade_user.html b/templates/exam/grade_user.html index 2994ee2..2a109af 100644 --- a/templates/exam/grade_user.html +++ b/templates/exam/grade_user.html @@ -35,17 +35,27 @@ Start time: {{ paper.start_time }} <br/> action="{{URL_ROOT}}/exam/grade_user/{{data.user.username}}/" method="post"> {% csrf_token %} {% for question, answers in paper.get_question_answers.items %} -<p><strong> Question: {{ question.id }}. {{ question.summary }} (Points: {{ question.points }})</strong> </p> -{% for answer in answers %} -<pre> -################################################################################ -{{ answer.answer|safe }} -# Autocheck: {{ answer.error }} -</pre> +<p><strong> + <a href="{{URL_ROOT}}/admin/exam/question/{{question.id}}"> + Question: {{ question.id }}. {{ question.summary }} </a> + (Points: {{ question.points }})</strong> </p> +{% if question.type == "mcq" %} +<p> Choices: +{% for option in question.options.strip.splitlines %} {{option}}, {% endfor %} +</p> +<p>Student answer: {{ answers.0|safe }}</p> +{% else %}{# non-mcq questions #} +<pre> +{% for answer in answers %}################################################################################ +{{ answer.answer.strip|safe }} +# Autocheck: {{ answer.error|safe }} +{% endfor %}</pre> +{% endif %} {# if question.type #} +{% with answers|last as answer %} Marks: <input id="q{{ question.id }}" type="text" name="q{{ question.id }}_marks" size="4" value="{{ answer.marks }}" /> -{% endfor %} {# for answer in answers #} +{% endwith %} {% endfor %} {# for question, answers ... #} <h3>Teacher comments: </h3> <textarea id="comments_{{paper.quiz.id}}" rows="10" cols="80" @@ -59,5 +69,15 @@ Marks: <input id="q{{ question.id }}" type="text" {% endif %} {# if data.papers #} +{% if data.papers.count > 1 %} +<a href="{{URL_ROOT}}/exam/monitor/"> + Monitor quiz</a> +{% else %} +{% with data.papers.0 as paper %} +<a href="{{URL_ROOT}}/exam/monitor/{{paper.quiz.id}}/"> + Monitor quiz</a> +{% endwith %} +{% endif %} +<br /> <a href="{{URL_ROOT}}/admin/">Admin</a> {% endblock content %} |