summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authoradityacp2018-01-02 15:51:36 +0530
committeradityacp2018-01-02 15:51:36 +0530
commitde0f0be2f5963da2f03616c192dfe339c021eff6 (patch)
treefafaac934e42e5f877257c6a9700074f7bff8822 /yaksh/views.py
parent8a062d48a0347ae43b1b9d5b1ca532387d8ad3d9 (diff)
downloadonline_test-de0f0be2f5963da2f03616c192dfe339c021eff6.tar.gz
online_test-de0f0be2f5963da2f03616c192dfe339c021eff6.tar.bz2
online_test-de0f0be2f5963da2f03616c192dfe339c021eff6.zip
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
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py8
1 files changed, 5 insertions, 3 deletions
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)