.
This commit is contained in:
@@ -9,7 +9,7 @@ CID: {{cid}}
|
||||
{{answer_count}} out of {{exam_length}} questions answered. Click to go to question.
|
||||
<div class="sba-finish-list">
|
||||
{% for question, answer in question_answer_tuples %}
|
||||
<a href="{% url 'physics:exam_take' pk=exam.id sk=forloop.counter0 cid=cid %}"><button {% if not answer %}class="unanswered"{% endif %}>{{forloop.counter}}: {{answer.answer}}</button></a>
|
||||
<a href="{% url 'physics: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>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
<div class="parent-help" title="Click to enable / disable the exam results">
|
||||
Publish results: <input type="checkbox" id="exam-publish-results-switch" {% if exam.publish_results %}checked{% endif %}> <span class="help-text">[When checked the exam results will be available on this site]</span>
|
||||
</div>
|
||||
<!--<p><button><a href="{% url 'anatomy:exam_take' pk=exam.pk sk=0 %}">Click here to start</a></button></p>-->
|
||||
This exam will be available to take <a href="{% url 'physics:exam_start' pk=exam.pk %}">here</a> (when active).
|
||||
|
||||
{% autoescape off %}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
Enter your CID in the below box.<br />
|
||||
<input id="cid-box" type="text" value="Candidate ID">
|
||||
<input id="passcode-box" type="text" value="Passcode">
|
||||
|
||||
<button>Start exam</button>
|
||||
|
||||
@@ -13,9 +14,10 @@ Enter your CID in the below box.<br />
|
||||
$(document).ready(function () {
|
||||
$("button").click(() => {
|
||||
let cid = $("#cid-box").val();
|
||||
let passcode = $("#passcode-box").val();
|
||||
|
||||
if (Number.isInteger(parseInt(cid))) {
|
||||
window.location.replace("{% url 'physics:exam_take' pk=exam.pk sk=0 cid='0000000' %}".replace("0000000", cid));
|
||||
window.location.replace("{% url 'physics:exam_take' pk=exam.pk sk=0 cid='0000000' passcode='ZZZZZZ' %}".replace("0000000", cid).replace("ZZZZZZ", passcode));
|
||||
} else {
|
||||
alert("Please enter a valid Candidate ID (CID).")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user