summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authorPalaparthy Adityachandra2020-09-23 19:42:13 +0530
committerGitHub2020-09-23 19:42:13 +0530
commitdb5ea3d7456d77c4e74538d5db120fbdfa9613e9 (patch)
tree374cb45c65d5bf5c2482afc3d5ccecfa4fb28644 /yaksh/views.py
parentc9d0d238cd201310e5e6da546f518675f7a12440 (diff)
parent36440a47e148899058bb02216b73bfe17ee46d34 (diff)
downloadonline_test-db5ea3d7456d77c4e74538d5db120fbdfa9613e9.tar.gz
online_test-db5ea3d7456d77c4e74538d5db120fbdfa9613e9.tar.bz2
online_test-db5ea3d7456d77c4e74538d5db120fbdfa9613e9.zip
Merge pull request #766 from prathamesh920/allow-additional-quiz-time
Allow to extend time even if the paper is completed.
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index a8f0d23..41f367d 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -3529,8 +3529,7 @@ def allow_special_attempt(request, user_id, course_id, quiz_id):
student.get_full_name())
messages.info(request, msg)
- return my_redirect('/exam/manage/monitor/{0}/{1}/'.format(quiz_id,
- course_id))
+ return redirect('yaksh:monitor', quiz_id, course_id)
@login_required
@@ -3549,8 +3548,8 @@ def revoke_special_attempt(request, micromanager_id):
msg = 'Revoked special attempt for {}'.format(
micromanager.student.get_full_name())
messages.info(request, msg)
- return my_redirect('/exam/manage/monitor/{0}/{1}/'.format(
- micromanager.quiz.id, course.id))
+ return redirect(
+ 'yaksh:monitor', micromanager.quiz.id, course.id)
@login_required
@@ -3567,7 +3566,7 @@ def extend_time(request, paper_id):
raise Http404('This course does not belong to you')
if request.method == "POST":
- extra_time = request.POST.get('extra_time', None)
+ extra_time = float(request.POST.get('extra_time', 0))
if extra_time is None:
msg = 'Please provide time'
else:
@@ -3577,5 +3576,5 @@ def extend_time(request, paper_id):
else:
msg = 'Bad Request'
messages.info(request, msg)
- return my_redirect('/exam/manage/monitor/{0}/{1}/'.format(
- anspaper.question_paper.quiz.id, course.id))
+ return redirect(
+ 'yaksh:monitor', anspaper.question_paper.quiz.id, course.id)