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
-13
View File
@@ -1,13 +0,0 @@
{% extends 'physics/base.html' %}
{% block content %}
<div class="physics">
<h2>CID: {{ cid }}</h2>
The following exams have been found (click to view answers and scores):
<ul>
{% for exam in exams %}
<li><a href="{% url 'physics:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
{% endfor %}
</ul>
</div>
{% endblock %}
@@ -1,18 +0,0 @@
{% extends 'physics/base.html' %}
{% block content %}
<div class="physics">
<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 %}
@@ -17,7 +17,7 @@
</ul>
<br /> Total mark: {{ total_score }} / {{max_score}}
<div>
<a href="{% url 'physics:cid_scores' cid %}">Other exams</a>
<a href="{% url 'cid_scores' cid %}">Other exams</a>
</div>
</div>
{% endblock %}