From de0f0be2f5963da2f03616c192dfe339c021eff6 Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 2 Jan 2018 15:51:36 +0530 Subject: Changes in views, models, templates and js - Rename learning_type to type in Lesson model - Change error message in views and change redirection - Change templates to rename learning_type to type for unit - Add new dialog for embedding Video URL --- yaksh/views.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'yaksh/views.py') diff --git a/yaksh/views.py b/yaksh/views.py index f9a43ba..295b983 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -337,8 +337,10 @@ def prof_manage(request, msg=None): rights/permissions and log in.""" user = request.user ci = RequestContext(request) - if not user.is_authenticated() and not is_moderator(user): - return my_redirect('/exam/login/') + if not user.is_authenticated(): + return my_redirect('/exam/login') + if not is_moderator(user): + return my_redirect('/exam/') courses = Course.objects.filter(creator=user, is_trial=False) trial_paper = AnswerPaper.objects.filter( @@ -467,7 +469,7 @@ def start(request, questionpaper_id=None, attempt_num=None, course_id=None, ) # allowed to start if not quest_paper.can_attempt_now(user, course_id): - msg = "You cannot attempt {0} quiz more than {1} times".format( + msg = "You cannot attempt {0} quiz more than {1} time(s)".format( quest_paper.quiz.description, quest_paper.quiz.attempts_allowed) if is_moderator(user): return prof_manage(request, msg=msg) -- cgit