Add prerequisites handling to CaseCollection and implement user access checks
This commit is contained in:
@@ -404,6 +404,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
// If time has already elapsed when the page loads, lock the question and do not autosubmit.
|
||||
if (remaining <= 0) {
|
||||
console.debug('Timer: time already expired on load, locking without autosubmit');
|
||||
lockQuestion();
|
||||
$timer.text(formatTime(0));
|
||||
return;
|
||||
}
|
||||
|
||||
function formatTime(s) {
|
||||
var mins = Math.floor(s / 60);
|
||||
var secs = s % 60;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{% extends 'atlas/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Collection requires completion of another collection</h2>
|
||||
<p>{{ message }}</p>
|
||||
{% if prereq %}
|
||||
<p>
|
||||
You must complete the collection: <a href="{% url 'atlas:collection_take_start' prereq.pk %}">{{ prereq.name }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
If you think this is an error, contact the course administrator.
|
||||
</p>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user