From 4f94c550a16654c6723a8c09cff6557a135f4747 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Mon, 16 May 2016 12:43:39 +0530 Subject: home button will redirect moderators to exam/manage instead of exam/quizzes --- yaksh/templates/yaksh/intro.html | 5 ++++- yaksh/views.py | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'yaksh') diff --git a/yaksh/templates/yaksh/intro.html b/yaksh/templates/yaksh/intro.html index f05e9a1..b4bc6d7 100644 --- a/yaksh/templates/yaksh/intro.html +++ b/yaksh/templates/yaksh/intro.html @@ -39,8 +39,11 @@
We hope you enjoy taking this exam !!!
- + {% if user == "moderator" %} + diff --git a/yaksh/views.py b/yaksh/views.py index 53c9372..989abf7 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -367,6 +367,8 @@ def start(request, questionpaper_id=None, attempt_num=None): attempt_number = 1 if not last_attempt else last_attempt.attempt_number +1 context = {'user': user, 'questionpaper': quest_paper, 'attempt_num': attempt_number} + if is_moderator(user): + context["user"] = "moderator" return my_render_to_response('yaksh/intro.html', context, context_instance=ci) else: -- cgit