diff options
Diffstat (limited to 'exam/management/commands/load_exam.py')
-rw-r--r-- | exam/management/commands/load_exam.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/exam/management/commands/load_exam.py b/exam/management/commands/load_exam.py index 157a94a..3f247a1 100644 --- a/exam/management/commands/load_exam.py +++ b/exam/management/commands/load_exam.py @@ -8,9 +8,10 @@ from django.core.management.base import BaseCommand from exam.models import Question, Quiz def clear_exam(): - """Delete all questions from the database.""" + """Deactivate all questions from the database.""" for question in Question.objects.all(): - question.delete() + question.active = False + question.save() # Deactivate old quizzes. for quiz in Quiz.objects.all(): |