.
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
<h2>{{exam.name}}</h2>
|
<h2>{{exam.name}}</h2>
|
||||||
|
|
||||||
|
Enter your CID in the below box.
|
||||||
<input id="cid-box" type="text" value="Candidate ID">
|
<input id="cid-box" type="text" value="Candidate ID">
|
||||||
|
|
||||||
<button>Start exam</button>
|
<button>Start exam</button>
|
||||||
@@ -12,7 +13,12 @@
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("button").click(() => {
|
$("button").click(() => {
|
||||||
let cid = $("#cid-box").val();
|
let cid = $("#cid-box").val();
|
||||||
|
|
||||||
|
if (Number.isInteger(cid)) {
|
||||||
window.location.replace("{% url 'sbas:exam_take' pk=exam.pk sk=0 cid='0000000' %}".replace("0000000", cid));
|
window.location.replace("{% url 'sbas:exam_take' pk=exam.pk sk=0 cid='0000000' %}".replace("0000000", cid));
|
||||||
|
} else {
|
||||||
|
alert("Please enter a valid Candidate ID (CID).")
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user