summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authormaheshgudi2016-05-13 18:37:24 +0530
committermaheshgudi2016-05-27 12:43:12 +0530
commit03b6bda58ec1af0ceb0de9f26d25bc342e550310 (patch)
treea7dea2e063f8a1c5522a0c833d2b94c92bd50d73 /yaksh/models.py
parent65d8a3d090af8c126fe3dc755050be13dd99283a (diff)
downloadonline_test-03b6bda58ec1af0ceb0de9f26d25bc342e550310.tar.gz
online_test-03b6bda58ec1af0ceb0de9f26d25bc342e550310.tar.bz2
online_test-03b6bda58ec1af0ceb0de9f26d25bc342e550310.zip
added docstrings to manager methods
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py6
1 files changed, 5 insertions, 1 deletions
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