From bb2fbbb66c7548eb6df8ebd65b9db2c0d56f359c Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Wed, 1 Jun 2016 00:35:34 +0530 Subject: changed mode argument to bool type --- yaksh/models.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'yaksh') diff --git a/yaksh/models.py b/yaksh/models.py index ec9a84b..015916d 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -314,7 +314,7 @@ class QuizManager(models.Manager): ) return trial_quiz - def create_trial_from_quiz(self, original_quiz_id, user, mode): + def create_trial_from_quiz(self, original_quiz_id, user, godmode): """Creates a trial quiz from existing quiz""" trial_quiz = self.get(id=original_quiz_id) trial_quiz.course.enroll(False, user) @@ -323,7 +323,7 @@ class QuizManager(models.Manager): trial_quiz.is_trial = True trial_quiz.time_between_attempts = 0 trial_quiz.prerequisite = None - if mode == "godmode": + if godmode: trial_quiz.duration = 1000 trial_quiz.active = True trial_quiz.start_date_time = datetime.now() @@ -460,8 +460,6 @@ class QuestionPaper(models.Model): # Total marks for the question paper. total_marks = models.FloatField() -# is_trial = models.BooleanField(default=False) - objects = QuestionPaperManager() def update_total_marks(self): -- cgit