diff options
author | hardythe1 | 2012-02-06 15:22:41 +0530 |
---|---|---|
committer | hardythe1 | 2012-02-06 15:22:41 +0530 |
commit | 76eec9e15f749a0a477ceec44820766b0e1ecc7e (patch) | |
tree | b1b34d9c7764aecbfc8a602d9399ef724e073bda /testapp | |
parent | 493f228229d96dab4a13b21cf7d4d089fcf7b2fd (diff) | |
parent | 573dcc6149f3ccf8ffaa2df2dba3461b3b795c48 (diff) | |
download | online_test-76eec9e15f749a0a477ceec44820766b0e1ecc7e.tar.gz online_test-76eec9e15f749a0a477ceec44820766b0e1ecc7e.tar.bz2 online_test-76eec9e15f749a0a477ceec44820766b0e1ecc7e.zip |
Merge branch 'visual_changes' of github.com:hardythe1/online_test into visual_changes
Diffstat (limited to 'testapp')
-rw-r--r-- | testapp/exam/views.py | 10 | ||||
-rw-r--r-- | testapp/templates/exam/login.html | 9 | ||||
-rw-r--r-- | testapp/templates/exam/monitor.html | 43 |
3 files changed, 47 insertions, 15 deletions
diff --git a/testapp/exam/views.py b/testapp/exam/views.py index c178a0b..05b69d1 100644 --- a/testapp/exam/views.py +++ b/testapp/exam/views.py @@ -5,6 +5,7 @@ import stat from os.path import dirname, pardir, abspath, join, exists import datetime +from django.http import HttpResponse from django.contrib.auth import login, logout, authenticate from django.shortcuts import render_to_response, get_object_or_404, redirect from django.template import RequestContext @@ -246,15 +247,15 @@ def check(request, q_id): return show_question(request, next_q) def quit(request): - return my_render_to_response('exam/quit.html', - context_instance=RequestContext(request)) + + return my_render_to_response('exam/quit.html',context_instance=RequestContext(request)) -def complete(request, reason=None): +def complete(request,reason = None): user = request.user no = False message = reason or 'The quiz has been completed. Thank you.' if request.method == 'POST' and 'no' in request.POST: - no = request.POST.get('no', False) + no = True if not no: # Logout the user and quit with the message given. logout(request) @@ -263,7 +264,6 @@ def complete(request, reason=None): else: return my_redirect('/exam/') - def monitor(request, quiz_id=None): """Monitor the progress of the papers taken so far.""" user = request.user diff --git a/testapp/templates/exam/login.html b/testapp/templates/exam/login.html index 770ceb4..62aedcf 100644 --- a/testapp/templates/exam/login.html +++ b/testapp/templates/exam/login.html @@ -18,19 +18,20 @@ <style type="text/css"> label { padding-top: 6px; - font-size: 13px; + font-size: 15px; line-height: 18px; float: left; - width: 130px; - text-align: right; + width: 80px; + text-align: center; color: #404040; +/* font-weight : bold;*/ } </style> <center><table class=span1> {{ form.as_table }} </table></center> -<center><button class="btn" type="submit">Login</button> <button class="btn" type="reset">Cancel</button></center> +<center><button class="btn" type="submit">Login</button> <button class="btn" type="reset">Cancel</button></center> <br><center><a href="{{URL_ROOT}}/exam/forgotpassword/">Forgot Password?</a></center><br> <center><a href="{{URL_ROOT}}/exam/register/">New User? Sign-Up </a></center> </form> diff --git a/testapp/templates/exam/monitor.html b/testapp/templates/exam/monitor.html index fb6cb58..0b59f76 100644 --- a/testapp/templates/exam/monitor.html +++ b/testapp/templates/exam/monitor.html @@ -1,22 +1,35 @@ {% extends "base.html" %} +<html lang="en"> + {% block title %} Quiz results {% endblock title %} {% block meta %} <meta http-equiv="refresh" content="30"/> {% endblock meta %} + + <body> {% block content %} + <div class="container"> + <div class="content"> +<div class="page-header"> {% if not quizzes and not quiz %} -<h1> Quiz results </h1> +<h1><center> Quiz results </center></h1> +</div> + <div class=row> + <div class=span14> -<p> No quizzes available. </p> +<center><h5> No quizzes available. </h5></center> {% endif %} {# ############################################################### #} {# This is rendered when we are just viewing exam/monitor #} {% if quizzes %} -<h1> Available quizzes </h1> +<center><h1> Available quizzes </h1></center> +</div> + <div class=row> + <div class=span14> <ul> {% for quiz in quizzes %} @@ -28,11 +41,24 @@ {# ############################################################### #} {# This is rendered when we are just viewing exam/monitor/quiz_num #} {% if quiz %} -<h1> {{ quiz.description }} results </h1> +<center><h1> {{ quiz.description }} results </h1></center> +</div> + <div class=row> + <div class=span14> + {% if papers %} {# <p> Quiz: {{ quiz_name }}</p> #} <p>Number of papers: {{ papers|length }} </p> - +<style type="text/css"> +table td { + vertical-align: top; + border-top: 1px solid #ddd; +} +table tbody th { + border-top: 1px solid #ddd; + vertical-align: top; +} +</style> <table border="1" cellpadding="3"> <tr> <th> Name </th> @@ -61,7 +87,12 @@ <p> No answer papers so far. </p> {% endif %} {# if papers #} {% endif %} - <a href="{{URL_ROOT}}/admin/">Admin</a> +</div></div></div> + +<footer> + <p>© FOSSEE group, IIT Bombay</p> + </footer> +</div> {% endblock content %} |