diff options
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 4c3b4a6..b6f935b 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -3604,8 +3604,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 @@ -3754,8 +3753,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 @@ -3790,7 +3789,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: @@ -3800,8 +3799,9 @@ 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 + ) @login_required |