summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index d611f6b..d29a286 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -173,13 +173,14 @@ class QuizManager(models.Manager):
def get_active_quizzes(self):
return self.filter(active=True, is_trial=False)
- def create_trial_quiz(self, trial_course, user):
+ def create_trial_quiz(self, user):
"""Creates a trial quiz for testing questions"""
trial_quiz = self.create(duration=1000,
description="trial_questions",
is_trial=True,
- time_between_attempts=0
- )
+ time_between_attempts=0,
+ creator=user
+ )
return trial_quiz
def create_trial_from_quiz(self, original_quiz_id, user, godmode,
@@ -1391,7 +1392,7 @@ class AnswerPaper(models.Model):
question_paper = models.ForeignKey(QuestionPaper)
# Answepaper will be unique to the course
- course = models.ForeignKey(Course)
+ course = models.ForeignKey(Course, null=True)
# The attempt number for the question paper.
attempt_number = models.IntegerField()