This commit is contained in:
Ross
2021-08-01 10:43:58 +01:00
parent 885cd3af79
commit a0448b2d82
3 changed files with 2 additions and 2 deletions
+1
View File
@@ -54,6 +54,7 @@
<div>
JSON creation time: {{exam.json_creation_time}} ({{exam.json_creation_time|date:"c"}}),
JSON creation id: {{exam.exam_json_id}}
{% if question.recreate_json %}[JSON out of date]{% endif %}
</div>
<a href="{% url 'longs:exam_json' pk=exam.pk %}">JSON</a>
<a href="{% url 'longs:exam_json_recreate' pk=exam.pk %}">Refresh JSON cache</a>
@@ -59,6 +59,7 @@
<div>
JSON creation time: {{question.json_creation_time}} ({{question.json_creation_time|date:"c"}}),
JSON creation id: {{question.question_json_id}}
{% if question.recreate_json %}[JSON out of date]{% endif %}
</div>
<a href="{% url 'longs:question_json' pk=question.pk %}">JSON</a>
<a href="{% url 'longs:question_json_recreate' pk=question.pk %}">Refresh JSON cache</a>
-2
View File
@@ -990,9 +990,7 @@ def question_json_recreate(request, pk):
# We also have to invalidate any exams
print("Start")
for exam in question.exams.all():
print(exam)
exam.recreate_json = True
exam.save()