Files
penracourses/sbas/templates/sbas/exam_start.html
T
Ross aa9afd933a .
2021-07-29 22:01:34 +01:00

26 lines
636 B
HTML
Executable File

{% extends 'base.html' %}
{% block content %}
<h2>{{exam.name}}</h2>
Enter your CID in the below box.<br />
<input id="cid-box" type="text" value="Candidate ID">
<button>Start exam</button>
<script type="text/javascript">
$(document).ready(function () {
$("button").click(() => {
let cid = $("#cid-box").val();
if (Number.isInteger(parseInt(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>
{% endblock %}