diff options
Diffstat (limited to 'testapp')
-rw-r--r-- | testapp/exam/views.py | 3 | ||||
-rw-r--r-- | testapp/static/exam/css/showusers.css | 5 | ||||
-rw-r--r-- | testapp/templates/exam/showusers.html | 17 |
3 files changed, 22 insertions, 3 deletions
diff --git a/testapp/exam/views.py b/testapp/exam/views.py index d0e3ddc..0504bde 100644 --- a/testapp/exam/views.py +++ b/testapp/exam/views.py @@ -493,7 +493,8 @@ def show_all_users(request): if not user.is_authenticated() or user.groups.filter(name='moderator').count() == 0: raise Http404('You are not allowed to view this page !') user = User.objects.filter(username__contains="") - context = { 'user':user } + questionpaper = QuestionPaper.objects.all() + context = { 'question': questionpaper } print context return my_render_to_response('exam/showusers.html',context,context_instance=RequestContext(request)) diff --git a/testapp/static/exam/css/showusers.css b/testapp/static/exam/css/showusers.css new file mode 100644 index 0000000..66a3746 --- /dev/null +++ b/testapp/static/exam/css/showusers.css @@ -0,0 +1,5 @@ +.table-class +{ + text-align:left; + width:60%; +} diff --git a/testapp/templates/exam/showusers.html b/testapp/templates/exam/showusers.html index 441b921..603af8a 100644 --- a/testapp/templates/exam/showusers.html +++ b/testapp/templates/exam/showusers.html @@ -5,9 +5,22 @@ List of Users {% endblock %} +{% block css %} +<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/showusers.css" type="text/css" /> +{% endblock css %} + {% block manage %} -{% for name in user %} -<a href="{{URL_ROOT}}/exam/manage/gradeuser/{{ name }}">{{ name }}</a><br> +<center><table style="text-align:left;" class=table-class border=3> +<th>Username +<th>First Name +<th>Last Name +<th>Quiz Description +{% for papers in question %} +<tr><td><a href="{{URL_ROOT}}/exam/manage/gradeuser/{{ papers.user.username }}">{{ papers.user.username }}</a><br> + <td >{{ papers.user.first_name.title }} + <td>{{ papers.user.last_name.title }} + <td>{{ papers.quiz.description }} {% endfor %} +</table></center> {% endblock %} |