diff options
author | adityacp | 2021-02-10 19:02:29 +0530 |
---|---|---|
committer | adityacp | 2021-02-10 19:02:29 +0530 |
commit | 8c1c1f6c8b1de16fba5f93e58a0cd3cb751e02d7 (patch) | |
tree | f55b9b990e1b4881d91770d6304cc9059ffaf1f3 /yaksh/views.py | |
parent | c179633d31dbdd1bb4cc9a6e157664bc5712756c (diff) | |
download | online_test-8c1c1f6c8b1de16fba5f93e58a0cd3cb751e02d7.tar.gz online_test-8c1c1f6c8b1de16fba5f93e58a0cd3cb751e02d7.tar.bz2 online_test-8c1c1f6c8b1de16fba5f93e58a0cd3cb751e02d7.zip |
Change in templates, views
- Revamp UI in course page
- Fix a bug where a trial module is created without setting is_trial in
models
- Fix a bug in question statistics where only completed answerpaper data
is needed
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 83b6766..1225b0e 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -2137,7 +2137,7 @@ def test_mode(user, godmode=False, questions_list=None, quiz_id=None, order=1, type="quiz", quiz=trial_quiz, check_prerequisite=False) module, created = LearningModule.objects.get_or_create( - order=1, creator=user, check_prerequisite=False, + order=1, creator=user, check_prerequisite=False, is_trial=True, name="Trial for {0}".format(trial_course.name)) module.learning_unit.add(trial_unit) trial_course.learning_module.add(module.id) @@ -2164,12 +2164,16 @@ def test_quiz(request, mode, quiz_id, course_id=None): request, "{0} is either expired or inactive".format(quiz.description) ) - return my_redirect('/exam/manage') + return my_redirect(reverse("yaksh:index")) trial_questionpaper, trial_course, trial_module = test_mode( current_user, godmode, None, quiz_id, course_id) - return my_redirect("/exam/start/{0}/{1}/{2}".format( - trial_questionpaper.id, trial_module.id, trial_course.id)) + return my_redirect( + reverse( + "yaksh:start_quiz", + args=[trial_questionpaper.id, trial_module.id, trial_course.id] + ) + ) @login_required |