generic score pages

This commit is contained in:
Ross
2020-12-16 22:50:11 +00:00
parent a6d87d1e89
commit b557305730
13 changed files with 135 additions and 60 deletions
+20
View File
@@ -0,0 +1,20 @@
{% extends 'base.html' %}
{% block content %}
<div class="">
<h2>CID: {{ cid }}</h2>
The following exams have been found (click to view answers and scores):
<h3>Physics</h3>
<ul>
{% for exam in physics_exams %}
<li><a href="{% url 'physics:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
{% endfor %}
</ul>
<h3>Anatomy</h3>
<ul>
{% for exam in anatomy_exams %}
<li><a href="{% url 'anatomy:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
{% endfor %}
</ul>
</div>
{% endblock %}
+18
View File
@@ -0,0 +1,18 @@
{% extends 'base.html' %}
{% block content %}
<div class="">
<h2>Please enter your CID</h2>
<p>CID: <input type="text" name="cid" id="cid-input"></p>
<button id="cid-selector-go-button">Go...</button>
</div>
<script>
$(document).ready(function () {
$("#cid-selector-go-button").click(() => {
cid = document.getElementById("cid-input").value;
window.location = window.location + cid;
})
})
</script>
{% endblock %}