summaryrefslogtreecommitdiff
path: root/testapp/exam/views.py
diff options
context:
space:
mode:
authorhardythe12012-02-15 18:35:40 +0530
committerhardythe12012-02-15 18:35:40 +0530
commit7c65d02d8a1f2ea72eabf3f13f85b8b444b1505e (patch)
tree8b5cbdef2a1be1193600b3e6a3c4e9a47024d33b /testapp/exam/views.py
parent85a76d4777d3917cf5dbb716107581d4998c408d (diff)
downloadonline_test-7c65d02d8a1f2ea72eabf3f13f85b8b444b1505e.tar.gz
online_test-7c65d02d8a1f2ea72eabf3f13f85b8b444b1505e.tar.bz2
online_test-7c65d02d8a1f2ea72eabf3f13f85b8b444b1505e.zip
New views to manage/moderate Quiz
Diffstat (limited to 'testapp/exam/views.py')
-rw-r--r--testapp/exam/views.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/testapp/exam/views.py b/testapp/exam/views.py
index 05b69d1..aed45d5 100644
--- a/testapp/exam/views.py
+++ b/testapp/exam/views.py
@@ -90,6 +90,15 @@ def user_register(request):
{'form':form},
context_instance=RequestContext(request))
+def add_question(request):
+ return render_to_response('exam/add_question.html',{})
+
+def add_quiz(request):
+ return render_to_response('exam/add_quiz.html',{})
+
+def prof_manage(request):
+ return render_to_response('manage.html',{})
+
def user_login(request):
"""Take the credentials of the user and log the user in."""
@@ -309,6 +318,12 @@ def get_user_data(username):
data['papers'] = papers
return data
+def show_all_users(request):
+ user = User.objects.filter(username__contains="")
+ context = { 'user':user }
+ print context
+ return my_render_to_response('exam/showusers.html',context,context_instance=RequestContext(request))
+
def user_data(request, username):
"""Render user data."""
current_user = request.user
@@ -342,10 +357,12 @@ def grade_user(request, username):
paper.save()
context = {'data': data}
+ print context
return my_render_to_response('exam/user_data.html', context,
context_instance=RequestContext(request))
else:
context = {'data': data}
+ print context
return my_render_to_response('exam/grade_user.html', context,
context_instance=RequestContext(request))