diff options
author | hardythe1 | 2012-02-28 12:09:28 +0530 |
---|---|---|
committer | hardythe1 | 2012-02-28 12:09:28 +0530 |
commit | b7ad768a6cc4fe5c8a05e20b1968f13a678c22cc (patch) | |
tree | 8fc6855f0a16929b5ca42fd89daa458129d98ff9 | |
parent | b1fbf5b02280de5b78b0249e777a179e34b50b98 (diff) | |
download | online_test-b7ad768a6cc4fe5c8a05e20b1968f13a678c22cc.tar.gz online_test-b7ad768a6cc4fe5c8a05e20b1968f13a678c22cc.tar.bz2 online_test-b7ad768a6cc4fe5c8a05e20b1968f13a678c22cc.zip |
changes to remove the inline css from every page
-rw-r--r-- | testapp/static/exam/css/base.css | 42 | ||||
-rw-r--r-- | testapp/static/exam/css/gradeuser.css | 6 | ||||
-rw-r--r-- | testapp/static/exam/css/login.css | 10 | ||||
-rw-r--r-- | testapp/static/exam/css/monitor.css | 11 | ||||
-rw-r--r-- | testapp/static/exam/css/question_quiz.css | 9 | ||||
-rw-r--r-- | testapp/templates/base.html | 78 | ||||
-rw-r--r-- | testapp/templates/exam/add_question.html | 12 | ||||
-rw-r--r-- | testapp/templates/exam/add_quiz.html | 13 | ||||
-rw-r--r-- | testapp/templates/exam/complete.html | 16 | ||||
-rw-r--r-- | testapp/templates/exam/edit_question.html | 14 | ||||
-rw-r--r-- | testapp/templates/exam/edit_quiz.html | 12 | ||||
-rw-r--r-- | testapp/templates/exam/grade_user.html | 11 | ||||
-rw-r--r-- | testapp/templates/exam/intro.html | 19 | ||||
-rw-r--r-- | testapp/templates/exam/login.html | 36 | ||||
-rw-r--r-- | testapp/templates/exam/monitor.html | 15 | ||||
-rw-r--r-- | testapp/templates/exam/question.html | 23 | ||||
-rw-r--r-- | testapp/templates/exam/quit.html | 17 | ||||
-rw-r--r-- | testapp/templates/exam/register.html | 36 | ||||
-rw-r--r-- | testapp/templates/manage.html | 86 |
19 files changed, 205 insertions, 261 deletions
diff --git a/testapp/static/exam/css/base.css b/testapp/static/exam/css/base.css index 9a37d2f..d2b227f 100644 --- a/testapp/static/exam/css/base.css +++ b/testapp/static/exam/css/base.css @@ -1,6 +1,8 @@ html, body { + background-color: #eee; margin: 0; padding: 0; + } h1, h2, @@ -168,20 +170,53 @@ textarea { * Basic and global styles for generating a grid system, structural layout, and page templates * ------------------------------------------------------------------------------------------- */ body { - background-color: #ffffff; + padding-top : 10px; + background-color: #eee; margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-weight: normal; line-height: 18px; color: #404040; + } .container { - width: 940px; + width: 820px; margin-left: auto; margin-right: auto; zoom: 1; } +.container > footer p { + text-align: center; +} +.container > .content { + background-color: #fff; + padding: 20px; + margin: 0 -20px; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); + -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15); + box-shadow: 0 1px 2px rgba(0,0,0,.15); +} +.content .span10, +.content .span14 { + min-height: 500px; +} +.content .span4 { + margin-left: 0; + padding-left: 19px; + border-left: 1px solid #eee; +} +.topbar .btn { + border: 0; +} +.page-header { + background-color: #f5f5f5; + padding: 20px 20px 10px; + margin: -20px -20px 20px; +} .container:before, .container:after { display: table; content: ""; @@ -263,6 +298,7 @@ a:hover { width: 160px; } .span4 { + min-height : 500px; width: 220px; } .span5 { @@ -281,7 +317,7 @@ a:hover { width: 520px; } .span10 { - width: 580px; + width: 560px; } .span11 { width: 640px; diff --git a/testapp/static/exam/css/gradeuser.css b/testapp/static/exam/css/gradeuser.css new file mode 100644 index 0000000..e50ab4e --- /dev/null +++ b/testapp/static/exam/css/gradeuser.css @@ -0,0 +1,6 @@ +textarea +{ +width : 550px; +height : 200px; + +} diff --git a/testapp/static/exam/css/login.css b/testapp/static/exam/css/login.css new file mode 100644 index 0000000..a10cbaa --- /dev/null +++ b/testapp/static/exam/css/login.css @@ -0,0 +1,10 @@ +label +{ + padding-top: 6px; + font-size: 15px; + line-height: 18px; + float: left; + width: 80px; + text-align: center; + color: #404040; + } diff --git a/testapp/static/exam/css/monitor.css b/testapp/static/exam/css/monitor.css new file mode 100644 index 0000000..b16c8b3 --- /dev/null +++ b/testapp/static/exam/css/monitor.css @@ -0,0 +1,11 @@ + table td + { + vertical-align: top; + border-top: 1px solid #ddd; + } + table tbody th + { + border-top: 1px solid #ddd; + vertical-align: top; + } + diff --git a/testapp/static/exam/css/question_quiz.css b/testapp/static/exam/css/question_quiz.css new file mode 100644 index 0000000..2e13364 --- /dev/null +++ b/testapp/static/exam/css/question_quiz.css @@ -0,0 +1,9 @@ +table th, table td + { + text-align: left; + } +textarea +{ +width : 300px; +height : 150px; +} diff --git a/testapp/templates/base.html b/testapp/templates/base.html index 49fc7ce..fed3939 100644 --- a/testapp/templates/base.html +++ b/testapp/templates/base.html @@ -13,62 +13,9 @@ <meta name="description" content=""> <meta name="author" content=""> {% endblock %} - - <link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/base.css" type="text/css" /> - + + <link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/base.css" type="text/css" /> {% block css %} - <style type="text/css"> - - html, body - { - background-color: #eee; - } - body - { - padding-top: 9px; - } - .container > footer p - { - text-align: center; - } - .container - { - width: 820px; - } - .container > .content - { - background-color: #fff; - padding: 20px; - margin: 0 -20px; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); - -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15); - box-shadow: 0 1px 2px rgba(0,0,0,.15); - } - .page-header - { - background-color: #f5f5f5; - padding: 20px 20px 10px; - margin: -20px -20px 20px; - } - .content .span10, - .content .span14 - { - min-height: 500px; - } - .content .span4 - { - margin-left: 0; - padding-left: 19px; - border-left: 1px solid #eee; - } - .topbar .btn - { - border: 0; - } - </style> {% endblock %} {% block script %} @@ -76,9 +23,22 @@ </head> <body {% block onload %}{% endblock %}> - <div class=box> - {% block content %} - {% endblock %} - </div> + <div class="container"> + <div class="content"> + <div class="page-header"> + <h1><Strong><center>{% block pagetitle %} {% endblock pagetitle %}</center></strong></h1> + </div> + <div class=row> + <div class=span14> + <h3><center>{% block formtitle %} {% endblock formtitle %}</center></h3><br> + {% block content %} + {% endblock %} + </div> + </div> + </div> + <footer> + <p>© FOSSEE group, IIT Bombay</p> + </footer> + </div> </body> </html> diff --git a/testapp/templates/exam/add_question.html b/testapp/templates/exam/add_question.html index d5503b5..59a1d64 100644 --- a/testapp/templates/exam/add_question.html +++ b/testapp/templates/exam/add_question.html @@ -2,17 +2,11 @@ {% block subtitle %}Add Question{% endblock %} +{% block css %} +<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" /> +{% endblock %} {% block manage %} - <style type="text/css"> - table th, table td - { - padding: 10px 10px 9px; - line-height: 18px; - text-align: left; - } - </style> - <form action="" method="post"> {% csrf_token %} <center><table class=span1> diff --git a/testapp/templates/exam/add_quiz.html b/testapp/templates/exam/add_quiz.html index 4dae30b..dedc627 100644 --- a/testapp/templates/exam/add_quiz.html +++ b/testapp/templates/exam/add_quiz.html @@ -3,16 +3,11 @@ {% block subtitle %}Add Quiz{% endblock %} -{% block manage %} - <style type='text/css'> - table th, table td - { - padding: 10px 10px 9px; - line-height: 18px; - text-align: left; - } - </style> +{% block css %} +<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" /> +{% endblock %} +{% block manage %} <form name=frm action="" method="post"> {% csrf_token %} <center> diff --git a/testapp/templates/exam/complete.html b/testapp/templates/exam/complete.html index f5c658f..dfeee6c 100644 --- a/testapp/templates/exam/complete.html +++ b/testapp/templates/exam/complete.html @@ -2,22 +2,10 @@ {% block title %}Good bye!{% endblock %} +{% block pagetitle %}Online Test{% endblock %} {% block content %} -<div class="container"> - <div class="content"> - <div class="page-header"> - <h1><Strong><center>Online Test</center></strong></h1> - </div> - <div class=row> - <div class=span14> + <center><h2> Good bye! </h2></center> <center><h4> {{message}} </h4></center> <center><h4>You may now close the browser.</h4></center> - </div> - </div> - </div> - <footer> - <p>© FOSSEE group, IIT Bombay</p> - </footer> -</div> {% endblock content %} diff --git a/testapp/templates/exam/edit_question.html b/testapp/templates/exam/edit_question.html index 7613cc6..6a4f1ec 100644 --- a/testapp/templates/exam/edit_question.html +++ b/testapp/templates/exam/edit_question.html @@ -2,21 +2,15 @@ {% block subtitle %}Edit Question{% endblock %} +{% block css %} +<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" /> +{% endblock %} {% block manage %} - <style type="text/css"> - table th, table td - { - padding: 10px 10px 9px; - line-height: 18px solid; - text-align: left; - } - </style> - <form action="{{URL_ROOT}}/exam/manage/editquestion/" method="post"> {% csrf_token %} {% for form in forms %} - <table> + <table class=span1> {{ form.as_table }} </table> <hr> diff --git a/testapp/templates/exam/edit_quiz.html b/testapp/templates/exam/edit_quiz.html index 27b179f..56eb0c0 100644 --- a/testapp/templates/exam/edit_quiz.html +++ b/testapp/templates/exam/edit_quiz.html @@ -3,15 +3,11 @@ {% block subtitle %}Edit Quiz(zes){% endblock %} +{% block css %} +<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" /> +{% endblock %} + {% block manage %} - <style type='text/css'> - table th, table td - { - padding: 10px 10px 9px; - line-height: 18px; - text-align: left; - } - </style> <form name=frm action="{{URL_ROOT}}/exam/manage/editquiz/" method="post"> {% csrf_token %} {% for form in forms %} diff --git a/testapp/templates/exam/grade_user.html b/testapp/templates/exam/grade_user.html index 5b0e1a7..fccdaaa 100644 --- a/testapp/templates/exam/grade_user.html +++ b/testapp/templates/exam/grade_user.html @@ -3,6 +3,10 @@ {% block title %} Grading papers for {{ data.user.get_full_name.title }} {% endblock title %} {% block subtitle %}Grading papers for {{ data.user.get_full_name.title }}{% endblock %} + +{% block css %} + <link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/gradeuser.css" type="text/css" /> +{% endblock %} {% block manage %} @@ -32,12 +36,13 @@ Start time: {{ paper.start_time }} <br/> {% if paper.answers.count %} <h3> Answers </h3><br> <form id="q{{ paper.quiz.id }}_form" - action="{{URL_ROOT}}/exam/manage/grade_user/{{data.user.username}}/" method="post"> + action="{{URL_ROOT}}/exam/manage/gradeuser/{{data.user.username}}/" method="post"> {% csrf_token %} {% for question, answers in paper.get_question_answers.items %} <p><strong> - <a href="{{URL_ROOT}}/admin/exam/question/{{question.id}}"> - Question: {{ question.id }}. {{ question.summary }} </a> + <!--a href="{{URL_ROOT}}/admin/exam/question/{{question.id}}"> + Question: {{ question.id }}. {{ question.summary }} </a--> + <a href="{{URL_ROOT}}/admin/exam/question/{{question.id}}" rel="floatbox" rev="width:468 height:255 scrolling:no" text="{{question}}" title="{{ question.description }} Correct Answer : {{ question.test }}"> Question: {{ question.id }}. {{ question.summary }} </a> (Points: {{ question.points }})</strong> </p> {% if question.type == "mcq" %} <p> Choices: diff --git a/testapp/templates/exam/intro.html b/testapp/templates/exam/intro.html index 167a4b2..ef218a2 100644 --- a/testapp/templates/exam/intro.html +++ b/testapp/templates/exam/intro.html @@ -3,14 +3,10 @@ {% block title %}Instructions and Rules {% endblock %} {% block content %} - <div class="container"> - <div class="content"> - <div class="page-header"> - <h1><Strong><center>Online Test</center></strong></h1> - </div> - <div class=row> - <div class=span14> - <h3><center>Important instructions & rules</center></h3><br> + +{% block pagetitle %}Online Test {% endblock %} +{% block formtitle %}Important instructions & rules {% endblock %} + <p> Welcome <strong>{{user.first_name.title}} {{user.last_name.title}}</strong>, to the programming quiz! </p> <p> This examination system has been developed with the intention of making you @@ -35,11 +31,4 @@ {% csrf_token %} <center><button class="btn" type="submit" name="start">Start Exam!</button></center> </form> - </div> - </div> - </div> - <footer> - <p>© FOSSEE group, IIT Bombay</p> - </footer> - </div> {% endblock content %} diff --git a/testapp/templates/exam/login.html b/testapp/templates/exam/login.html index 07a91fc..078e7a7 100644 --- a/testapp/templates/exam/login.html +++ b/testapp/templates/exam/login.html @@ -1,30 +1,16 @@ {% extends "base.html" %} {% block title %}Login{% endblock title %} - +{% block pagetitle %} Online Test {% endblock %} +{% block formtitle %}Login{% endblock %} +{% block css %} +<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/login.css" type="text/css" /> +{% endblock %} {% block content %} -<div class="container"> - <div class="content"> - <div class="page-header"> - <h1><Strong><center>Online Test</center></strong></h1> - </div> - <div class=row> - <div class=span14> - <h3><center>Login</center></h3><br> + <form action="" method="post"> {% csrf_token %} - <style type="text/css"> - label - { - padding-top: 6px; - font-size: 15px; - line-height: 18px; - float: left; - width: 80px; - text-align: center; - color: #404040; - } - </style> + <center><table class=span1> {{ form.as_table }} </table></center> @@ -32,11 +18,5 @@ <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> - </div> - </div> - </div> - <footer> - <p>© FOSSEE group, IIT Bombay</p> - </footer> -</div> + {% endblock content %} diff --git a/testapp/templates/exam/monitor.html b/testapp/templates/exam/monitor.html index a0287e7..9385e73 100644 --- a/testapp/templates/exam/monitor.html +++ b/testapp/templates/exam/monitor.html @@ -4,6 +4,9 @@ {% block meta %} <meta http-equiv="refresh" content="30"/> {% endblock meta %} +{% block css %} +<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" /> +{% endblock %} {% block manage %} {% if not quizzes and not quiz %} @@ -30,18 +33,6 @@ {% 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> diff --git a/testapp/templates/exam/question.html b/testapp/templates/exam/question.html index 113a9ae..f5dcdf4 100644 --- a/testapp/templates/exam/question.html +++ b/testapp/templates/exam/question.html @@ -48,6 +48,7 @@ {% block onload %} onload="update_time()" {% endblock onload %} +{% block pagetitle %}<br><h4>Test for {{ user.first_name.title }} {{ user.last_name.title }} </h4> {% endblock %} {% block content %} <div class="topbar"> <div class="fill"> @@ -61,16 +62,10 @@ </div> </div> -<div class="container"> - <div class="content"> - <div class="page-header"> - <br><center><h4>Test for {{ user.first_name.title }} {{ user.last_name.title }} </h4></center> - </div> - <div class> - <div class> - <h4><u> {{ question.summary }} </u></h4> - <h5>{{ question.description|safe }} </h5> - <h5>(Marks : {{ question.points }}) </h5> + + <h4><u> {{ question.summary }} </u><font class=pull-right>(Marks : {{ question.points }}) </font></h4><br> + <font size=3 face=arial> {{ question.description|safe }} </font> + {% if error_message %}<h5>ERROR:<h5><pre>{{ error_message }}</pre>{% endif %} <p id="status"></p> <form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/" method="post"> @@ -93,11 +88,5 @@ <h5>{{ user.first_name.title }} {{ user.last_name.title }}, You have {{ paper.questions_left }} question(s) left in {{ quiz_name }} </h5> <p id="time_left"><strong> Time left: </strong></p> <hr/> - </div> - </div> - </div> - <footer> - <p>© FOSSEE group, IIT Bombay</p> - </footer> -</div> + {% endblock content %} diff --git a/testapp/templates/exam/quit.html b/testapp/templates/exam/quit.html index 118ea07..40a0a92 100644 --- a/testapp/templates/exam/quit.html +++ b/testapp/templates/exam/quit.html @@ -1,26 +1,13 @@ {% extends "base.html" %} {% block title %}Quit exam {% endblock %} - +{% block pagetitle %}Online Test {% endblock %} {% block content %} -<div class="container"> - <div class="content"> - <div class="page-header"> - <h1><Strong><center>Online Test</center></strong></h1> - </div> - <div class=row> - <div class=span14> + <center><h4>Your current answers are saved.</h4></center> <center><h4> Are you sure you wish to quit the exam?</h4></center> <form action="{{URL_ROOT}}/exam/complete/" method="post"> {% csrf_token %} <center><button class="btn" type="submit" name="yes">Yes!</button> <button class="btn" type="submit" name="no">No!</button></center> </form> - </div> - </div> - </div> - <footer> - <p>© FOSSEE group, IIT Bombay</p> - </footer> -</div> {% endblock content %} diff --git a/testapp/templates/exam/register.html b/testapp/templates/exam/register.html index e416470..5ff79cc 100644 --- a/testapp/templates/exam/register.html +++ b/testapp/templates/exam/register.html @@ -2,27 +2,19 @@ {% block title %}Registration form {% endblock %} +{% block pagetitle %}Online Test {% endblock %} +{% block formtitle %}Please fill in the following details {% endblock %} + {% block content %} -<div class="container"> - <div class="content"> - <div class="page-header"> - <h1><center>Online Test</center></h1> - </div> - <div> - <div> - <h3><center>Please fill in the following details</center></h3><br> - <form action="" method="post"> - {% csrf_token %} - <center><table class=span1> - {{ form.as_table }} - </table></center> - <center><button class="btn" type="submit">Register</button> <button class="btn" type="reset">Cancel</button></center> - </form> - </div> - </div> - </div> - <footer> - <p>© FOSSEE group, IIT Bombay</p> - </footer> -</div> + + + +<form action="" method="post"> + {% csrf_token %} + <center><table class=span1> + {{ form.as_table }} + </table></center> + <center><button class="btn" type="submit">Register</button> <button class="btn" type="reset">Cancel</button></center> +</form> + {% endblock content %} diff --git a/testapp/templates/manage.html b/testapp/templates/manage.html index a2941b0..9995450 100644 --- a/testapp/templates/manage.html +++ b/testapp/templates/manage.html @@ -1,44 +1,56 @@ -{% extends "base.html" %} +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -{% block title %}Manage{% endblock title %} +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <title> + {% block title %} + {% endblock %} + </title> -{% block content %} -<div class="container"> - <div class="content"> - <div class="page-header"> - <font size=6><strong>Online Test</font></strong> - <button class="btn pull-right" type="submit" onClick='location.replace("{{URL_ROOT}}/exam/complete/");'>Log out</button> - </div> + {% block meta %} + <meta charset="utf-8"> + <meta name="description" content=""> + <meta name="author" content=""> + {% endblock %} + + <link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/base.css" type="text/css" /> + {% block css %} + {% endblock %} - <div class=row> - <div class=span10 style="overflow:auto"> - <h3><center>{% block subtitle %} {% endblock %}</center></h3><br> - {% block manage %} - {% endblock %} - </div> - <style type='text/css'> - .content .span4 - { - min-height: 500px; - } - .textarea - { - width: 10px; - } - </style> - <div class="span4"> + {% block script %} + {% endblock %} + </head> + +<body {% block onload %}{% endblock %}> + + <div class="container"> + <div class="content"> + <div class="page-header"> + <font size=6><strong>Online Test</font></strong> + <button class="btn pull-right" type="submit" onClick='location.replace("{{URL_ROOT}}/exam/complete/");'>Log out</button> + </div> + <div class=row> + <div class=span10> + <h3><center>{% block subtitle %} {% endblock %}</center></h3><br> + {% block manage %} + {% endblock %} + </div> + <div class=span4> <h5>Manage</h5> <ul> - <li><a href="{{ URL_ROOT }}/exam/manage/questions">Questions</a></li> + <li><a href="{{ URL_ROOT }}/exam/manage/questions">Questions</a></li> <li><a href="{{ URL_ROOT }}/exam/manage/showquiz">Quizzes</a></li> - <li><a href="{{ URL_ROOT }}/exam/manage/gradeuser">Grade User</a></li> - <li><a href="{{ URL_ROOT }}/exam/manage/monitor">Monitor</a></li> + <li><a href="{{ URL_ROOT }}/exam/manage/gradeuser">Grade User</a></li> + <li><a href="{{ URL_ROOT }}/exam/manage/monitor">Monitor</a></li> </ul> - </div> - </div> - </div> - <footer> - <p>© FOSSEE group, IIT Bombay</p> - </footer> -</div> <!-- /container --> -{% endblock content %} + </div> + </div> + </div> + <footer> + <p>© FOSSEE group, IIT Bombay</p> + </footer> + </div> + +</body> +</html> |