summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authoradityacp2017-01-10 17:31:20 +0530
committeradityacp2017-01-10 17:31:20 +0530
commitc72cf1ec5abe3cb7cadf24dbf69f949a66f8cf4d (patch)
treee11ed046dc7d08560ea0d62271add1cd3ef2e648 /yaksh/views.py
parent05b8d1f19bc566e28f2b9bc232389c65f6e4b9bf (diff)
downloadonline_test-c72cf1ec5abe3cb7cadf24dbf69f949a66f8cf4d.tar.gz
online_test-c72cf1ec5abe3cb7cadf24dbf69f949a66f8cf4d.tar.bz2
online_test-c72cf1ec5abe3cb7cadf24dbf69f949a66f8cf4d.zip
Change views and models to create demo course
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 7ecf6aa..a2ad6f2 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -269,7 +269,7 @@ def show_all_questionpapers(request, questionpaper_id=None):
@login_required
-def prof_manage(request):
+def prof_manage(request, msg=None):
"""Take credentials of the user with professor/moderator
rights/permissions and log in."""
user = request.user
@@ -303,7 +303,7 @@ def prof_manage(request):
temp = paper, answer_papers, users_passed, users_failed
users_per_paper.append(temp)
context = {'user': user, 'users_per_paper': users_per_paper,
- 'trial_paper': trial_paper
+ 'trial_paper': trial_paper, 'msg': msg
}
return my_render_to_response('yaksh/moderator_dashboard.html', context, context_instance=ci)
return my_redirect('/exam/login/')
@@ -1241,8 +1241,7 @@ def create_demo_course(request):
msg = "Created Demo course successfully"
else:
msg = "Demo course already created"
- context = {'msg': msg}
- return my_render_to_response('manage.html', context, context_instance=ci)
+ return prof_manage(request, msg)
@login_required