.
This commit is contained in:
@@ -8,7 +8,10 @@
|
||||
{% for exam in exams %}
|
||||
{% if exam.active %}
|
||||
<li>
|
||||
<a href="{% url 'physics:exam_overview' pk=exam.pk %}" class="flex-col">{{exam.name}}</a> <a href="{% url 'physics:exam_scores_cid' pk=exam.pk %}" class="flex-col">Scores</a> <span class="flex-col icon-container"><span class="published-icon {% if exam.publish_results %}published{% endif %}">Results Published</span></span>
|
||||
<a href="{% url 'physics:exam_overview' pk=exam.pk %}" class="flex-col">{{exam.name}}</a> <a href="{% url 'physics:exam_scores_cid' pk=exam.pk %}" class="flex-col">Scores</a> <span class="flex-col icon-container"><span class="published-icon {% if exam.publish_results %}published{% endif %}">Results Published</span>
|
||||
Publish results: <input type="checkbox" class="exam-publish-results-switch" data-posturl="{% url 'physics:exam_toggle_results_published' pk=exam.pk %}"
|
||||
{% if exam.publish_results %}checked{% endif %}>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
console.log('[Done]');
|
||||
})
|
||||
})
|
||||
$("#exam-publish-results-switch").on("change", function (evt) {
|
||||
$("#exam-publish-results-switch, .exam-publish-results-switch").on("change", function (evt) {
|
||||
$.ajax({
|
||||
url: evt.currentTarget.dataset.posturl,
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user