diff options
author | prathamesh | 2017-11-22 18:38:14 +0530 |
---|---|---|
committer | prathamesh | 2017-11-22 18:38:14 +0530 |
commit | 4fc8565be63375b48a7a897a1701e264f4ccac66 (patch) | |
tree | 1501e90caa681de79e24239e540bae61656b198b /yaksh/models.py | |
parent | acce9174639224234325c007f30d5679712e4c2c (diff) | |
download | online_test-4fc8565be63375b48a7a897a1701e264f4ccac66.tar.gz online_test-4fc8565be63375b48a7a897a1701e264f4ccac66.tar.bz2 online_test-4fc8565be63375b48a7a897a1701e264f4ccac66.zip |
Fixed existing model tests
Also, added "markdown" to requirements
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 9 |
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() |