From 8e5354fb2fdab96780bfd147ba5b1724eebd673b Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 21 Nov 2017 17:08:23 +0530 Subject: Change in templates, js, template tag - Add new template tag to fetch course module completion status - View all lessons/quizzes during quiz - Change button values - Change user mode and god mode --- yaksh/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'yaksh/views.py') diff --git a/yaksh/views.py b/yaksh/views.py index f7f5e71..90ef5f9 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -1696,14 +1696,14 @@ def test_mode(user, godmode=False, questions_list=None, quiz_id=None, trial_questionpaper = QuestionPaper.objects.create_trial_paper_to_test_questions( trial_quiz, questions_list ) - trial_unit = LearningUnit.objects.get_or_create( + trial_unit, created = LearningUnit.objects.get_or_create( order=1, learning_type="quiz", quiz=trial_quiz, check_prerequisite=False) - module = LearningModule.objects.get_or_create( + module, created = LearningModule.objects.get_or_create( order=1, creator=user, check_prerequisite=False, name="Trial for {0}".format(trial_course.name)) - module[0].learning_unit.add(trial_unit[0]) - trial_course.learning_module.add(module[0].id) + module.learning_unit.add(trial_unit) + trial_course.learning_module.add(module.id) else: trial_quiz, trial_course, module = Quiz.objects.create_trial_from_quiz( quiz_id, user, godmode, course_id @@ -1711,7 +1711,7 @@ def test_mode(user, godmode=False, questions_list=None, quiz_id=None, trial_questionpaper = QuestionPaper.objects.create_trial_paper_to_test_quiz( trial_quiz, quiz_id ) - return trial_questionpaper, trial_course, module[0] + return trial_questionpaper, trial_course, module @login_required -- cgit