start updating physics

This commit is contained in:
Ross
2021-12-10 23:02:19 +00:00
parent d9c6f464ee
commit ea52d573fe
7 changed files with 546 additions and 273 deletions
+25
View File
@@ -0,0 +1,25 @@
{% 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 'physics:exam_take' pk=exam.pk sk=0 cid='0000000' %}".replace("0000000", cid));
} else {
alert("Please enter a valid Candidate ID (CID).")
}
});
});
</script>
{% endblock %}