fix sba
This commit is contained in:
@@ -5,14 +5,29 @@
|
||||
{% include 'user_score_header.html' %}
|
||||
<ul>
|
||||
{% for question, a, score, correct_answer, chosen_answer in answers_and_marks %}
|
||||
<li class="user-answer-li"><a href="{% url 'sbas:exam_take' exam.pk forloop.counter0 cid passcode %}">Question
|
||||
{{forloop.counter}}</a> - {{ question.stem |safe}}</li>
|
||||
<span>Correct answer: {{correct_answer|safe}} <br />Chosen answer: {{a}} {{chosen_answer|safe}}
|
||||
{% if exam.publish_results or view_all_results %}
|
||||
<span class="answer-{{score}}">(Score: {{score}})</span>
|
||||
<li class="user-answer-li">
|
||||
{% if request.user.is_authenticated %}
|
||||
<a href="{% url 'sbas:exam_take_user' pk=exam.id sk=forloop.counter0 %}">
|
||||
Question {{forloop.counter}}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'sbas:exam_take' exam.pk forloop.counter0 cid passcode %}">
|
||||
Question {{forloop.counter}}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</span>
|
||||
- {{ question.stem |safe}}
|
||||
{% if exam.publish_results %}
|
||||
<span class="correct-answer">Correct answer: {{correct_answer|safe}}</span> <br />
|
||||
{% endif %}
|
||||
|
||||
<span class="submitted-user-answer">{{a}}</span>
|
||||
Chosen answer: {{chosen_answer|safe}}
|
||||
{% if exam.publish_results or view_all_results %}
|
||||
<span class="answer-{{score}}">(Score: {{score}})</span>
|
||||
{% endif %}
|
||||
|
||||
</li>
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% include 'user_scores_footer.html' %}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<span id="user-id">
|
||||
{% if request.user.is_authenticated %}
|
||||
User: {{request.user}}
|
||||
{% else %}
|
||||
CID: {{cid}}
|
||||
{% endif %}
|
||||
</span>
|
||||
<div id="timeup">
|
||||
Allocated time over.
|
||||
</div>
|
||||
@@ -29,15 +31,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="no-select">
|
||||
<h2>{{exam.name}}: Question [{{pos|add:1}}/{{exam_length}}]</h2>
|
||||
<h2>{{exam.name}}: Question [<span id="question-number">{{pos|add:1}}</span>/<span id="exam-length">{{exam_length}}</span>]</h2>
|
||||
{% if exam.publish_results %}
|
||||
<div class="alert alert-primary" role="alert">
|
||||
<div class="alert alert-primary review-mode-alert" role="alert">
|
||||
Exam is in review mode. Add question feedback <a href="#" onclick="return window.create_popup_window('{% url 'feedback_create' question_type='sbas' pk=question.pk %}')">here</a>.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div>
|
||||
<p>{{question.stem|safe}}</p>
|
||||
<p><span id="question-stem">{{question.stem|safe}}</span></p>
|
||||
</div>
|
||||
<ul class="sba-answer-list">
|
||||
<li data-ans="a">{{question.a_answer|safe}}</li>
|
||||
|
||||
@@ -1,19 +1,40 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
CID: {{cid}}
|
||||
{% if request.user.is_authenticated %}
|
||||
User: {{request.user}}
|
||||
{% else %}
|
||||
CID: {{cid}}
|
||||
{% endif %}
|
||||
|
||||
<h2>Exam: {{exam.name}}</h2>
|
||||
|
||||
{% if exam.publish_results %}
|
||||
<div class="alert alert-primary review-mode-alert" role="alert">
|
||||
Exam is in review mode. Score are available
|
||||
{% if request.user.is_authenticated %}
|
||||
<a href="{% url 'sbas:exam_scores_user' pk=exam.id %}">here</a>
|
||||
|
||||
{% else %}
|
||||
<a href="{% url 'sbas:exam_scores_cid_user' pk=exam.id cid=cid passcode=passcode %}">here</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div><p>Questions</p></div>
|
||||
{{answer_count}} out of {{exam_length}} questions answered. Click to go to question.
|
||||
<div class="overview-text">{{answer_count}} out of {{exam_length}} questions answered. Click to go to question.</div>
|
||||
<div class="sba-finish-list">
|
||||
{% for question, answer in question_answer_tuples %}
|
||||
<a href="{% url 'sbas:exam_take' pk=exam.id sk=forloop.counter0 cid=cid passcode=passcode %}"><button {% if not answer %}class="unanswered"{% endif %}>{{forloop.counter}}: {{answer.answer}}</button></a>
|
||||
{% if request.user.is_authenticated %}
|
||||
<a href="{% url 'sbas:exam_take_user' pk=exam.id sk=forloop.counter0 %}"><button {% if not answer %}class="unanswered"{% endif %}>{{forloop.counter}}: {{answer.answer}}</button></a>
|
||||
|
||||
{% else %}
|
||||
<a href="{% url 'sbas:exam_take' pk=exam.id sk=forloop.counter0 cid=cid passcode=passcode %}"><button {% if not answer %}class="unanswered"{% endif %}>{{forloop.counter}}: {{answer.answer}}</button></a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Start time: {{cid_user_exam.start_time}}
|
||||
Start time: {{cid_user_exam.start_time}}<br/>
|
||||
Last change time: {{cid_user_exam.end_time}}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user