diff options
author | adityacp | 2017-11-21 17:08:23 +0530 |
---|---|---|
committer | adityacp | 2017-11-21 17:18:10 +0530 |
commit | 8e5354fb2fdab96780bfd147ba5b1724eebd673b (patch) | |
tree | 3bcb0ecfc622b600852c5062c0d84fda2e690a12 /yaksh/views.py | |
parent | 38f6d5aac0e387fed28003c2655877fa21deac93 (diff) | |
download | online_test-8e5354fb2fdab96780bfd147ba5b1724eebd673b.tar.gz online_test-8e5354fb2fdab96780bfd147ba5b1724eebd673b.tar.bz2 online_test-8e5354fb2fdab96780bfd147ba5b1724eebd673b.zip |
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
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 10 |
1 files changed, 5 insertions, 5 deletions
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 |