.
This commit is contained in:
@@ -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