summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exam/management/commands/load_exam.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/exam/management/commands/load_exam.py b/exam/management/commands/load_exam.py
index 5b8aa81..157a94a 100644
--- a/exam/management/commands/load_exam.py
+++ b/exam/management/commands/load_exam.py
@@ -12,8 +12,10 @@ def clear_exam():
for question in Question.objects.all():
question.delete()
+ # Deactivate old quizzes.
for quiz in Quiz.objects.all():
- quiz.delete()
+ quiz.active = False
+ quiz.save()
def load_exam(filename):
"""Load questions and quiz from the given Python file. The Python file