diff options
author | maheshgudi | 2016-06-01 00:35:34 +0530 |
---|---|---|
committer | maheshgudi | 2016-06-01 00:35:34 +0530 |
commit | bb2fbbb66c7548eb6df8ebd65b9db2c0d56f359c (patch) | |
tree | 72b1861b8a5651ada0acee826e7454c8d64afa3d | |
parent | 8055dc6c13aabaa5caaa16b5ec4b2e07bb4b5b2a (diff) | |
download | online_test-bb2fbbb66c7548eb6df8ebd65b9db2c0d56f359c.tar.gz online_test-bb2fbbb66c7548eb6df8ebd65b9db2c0d56f359c.tar.bz2 online_test-bb2fbbb66c7548eb6df8ebd65b9db2c0d56f359c.zip |
changed mode argument to bool type
-rw-r--r-- | yaksh/models.py | 6 |
1 files changed, 2 insertions, 4 deletions
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): |