From 03b6bda58ec1af0ceb0de9f26d25bc342e550310 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Fri, 13 May 2016 18:37:24 +0530 Subject: added docstrings to manager methods --- yaksh/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'yaksh/models.py') diff --git a/yaksh/models.py b/yaksh/models.py index 0303321..1875fd2 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -408,6 +408,7 @@ class Quiz(models.Model): class QuestionPaperManager(models.Manager): def _create_trial_from_questionpaper(self, original_quiz_id): + """Creates a copy of the original questionpaper""" trial_questionpaper = self.get(quiz_id = original_quiz_id) trial_questions = {"fixed_questions": trial_questionpaper\ .fixed_questions.all(), @@ -418,7 +419,9 @@ class QuestionPaperManager(models.Manager): trial_questionpaper.save() return trial_questionpaper, trial_questions - def create_trial_paper_to_test_questions(self, trial_quiz, questions_list): + def create_trial_paper_to_test_questions(self, trial_quiz, + questions_list): + """Creates a trial question paper to test selected questions""" if questions_list is not None: trial_questionpaper=self.create(quiz=trial_quiz, total_marks=10, @@ -427,6 +430,7 @@ class QuestionPaperManager(models.Manager): return trial_questionpaper def create_trial_paper_to_test_quiz(self, trial_quiz, original_quiz_id): + """Creates a trial question paper to test quiz.""" trial_questionpaper, trial_questions = self._create_trial_from_questionpaper\ (original_quiz_id) trial_questionpaper.quiz = trial_quiz -- cgit