From b7ad768a6cc4fe5c8a05e20b1968f13a678c22cc Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Tue, 28 Feb 2012 12:09:28 +0530 Subject: changes to remove the inline css from every page --- testapp/static/exam/css/base.css | 42 +++++++++++++-- testapp/static/exam/css/gradeuser.css | 6 +++ testapp/static/exam/css/login.css | 10 ++++ testapp/static/exam/css/monitor.css | 11 ++++ testapp/static/exam/css/question_quiz.css | 9 ++++ testapp/templates/base.html | 78 +++++++--------------------- testapp/templates/exam/add_question.html | 12 ++--- testapp/templates/exam/add_quiz.html | 13 ++--- testapp/templates/exam/complete.html | 16 +----- testapp/templates/exam/edit_question.html | 14 ++--- testapp/templates/exam/edit_quiz.html | 12 ++--- testapp/templates/exam/grade_user.html | 11 ++-- testapp/templates/exam/intro.html | 19 ++----- testapp/templates/exam/login.html | 36 +++---------- testapp/templates/exam/monitor.html | 15 ++---- testapp/templates/exam/question.html | 23 +++------ testapp/templates/exam/quit.html | 17 +----- testapp/templates/exam/register.html | 36 +++++-------- testapp/templates/manage.html | 86 ++++++++++++++++++------------- 19 files changed, 205 insertions(+), 261 deletions(-) create mode 100644 testapp/static/exam/css/gradeuser.css create mode 100644 testapp/static/exam/css/login.css create mode 100644 testapp/static/exam/css/monitor.css create mode 100644 testapp/static/exam/css/question_quiz.css 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 @@ {% endblock %} - - - + + {% block css %} - {% endblock %} {% block script %} @@ -76,9 +23,22 @@ -
- {% block content %} - {% endblock %} -
+
+
+ +
+
+

{% block formtitle %} {% endblock formtitle %}


+ {% block content %} + {% endblock %} +
+
+
+ +
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 %} + +{% endblock %} {% block manage %} - -
{% csrf_token %}
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 %} - +{% block css %} + +{% endblock %} +{% block manage %} {% csrf_token %}
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 %} -
-
- -
-
+

Good bye!

{{message}}

You may now close the browser.

-
-
-
-
-

© FOSSEE group, IIT Bombay

-
-
{% 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 %} + +{% endblock %} {% block manage %} - - {% csrf_token %} {% for form in forms %} -
+
{{ form.as_table }}

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 %} + +{% endblock %} + {% block manage %} - {% 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 %} + +{% endblock %} {% block manage %} @@ -32,12 +36,13 @@ Start time: {{ paper.start_time }}
{% if paper.answers.count %}

Answers


+ action="{{URL_ROOT}}/exam/manage/gradeuser/{{data.user.username}}/" method="post"> {% csrf_token %} {% for question, answers in paper.get_question_answers.items %}

- - Question: {{ question.id }}. {{ question.summary }} + + Question: {{ question.id }}. {{ question.summary }} (Points: {{ question.points }})

{% if question.type == "mcq" %}

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 %} -

-
- -
-
-

Important instructions & rules


+ +{% block pagetitle %}Online Test {% endblock %} +{% block formtitle %}Important instructions & rules {% endblock %} +

Welcome {{user.first_name.title}} {{user.last_name.title}}, to the programming quiz!

This examination system has been developed with the intention of making you @@ -35,11 +31,4 @@ {% csrf_token %}

-
-
-
-
-

© FOSSEE group, IIT Bombay

-
-
{% 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 %} + +{% endblock %} {% block content %} -
-
- -
-
-

Login


+
{% csrf_token %} - +
{{ form.as_table }}
@@ -32,11 +18,5 @@
Forgot Password?

New User? Sign-Up
-
-
-
-
-

© FOSSEE group, IIT Bombay

-
-
+ {% 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 %} {% endblock meta %} +{% block css %} + +{% endblock %} {% block manage %} {% if not quizzes and not quiz %} @@ -30,18 +33,6 @@ {% if papers %} {#

Quiz: {{ quiz_name }}

#}

Number of papers: {{ papers|length }}

- 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 %}

Test for {{ user.first_name.title }} {{ user.last_name.title }}

{% endblock %} {% block content %}
@@ -61,16 +62,10 @@
-
-
- -
-
-

{{ question.summary }}

-
{{ question.description|safe }}
-
(Marks : {{ question.points }})
+ +

{{ question.summary }} (Marks : {{ question.points }})


+ {{ question.description|safe }} + {% if error_message %}
ERROR:
{{ error_message }}
{% endif %}

@@ -93,11 +88,5 @@
{{ user.first_name.title }} {{ user.last_name.title }}, You have {{ paper.questions_left }} question(s) left in {{ quiz_name }}

Time left:


-
-
-
-
-

© FOSSEE group, IIT Bombay

-
-
+ {% 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 %} -
-
- -
-
+

Your current answers are saved.

Are you sure you wish to quit the exam?

{% csrf_token %}
 
-
-
-
-
-

© FOSSEE group, IIT Bombay

-
-
{% 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 %} -
-
- -
-
-

Please fill in the following details


-
- {% csrf_token %} -
Name
- {{ form.as_table }} -
-
  
- - - - - - + + + +
+ {% csrf_token %} +
+ {{ form.as_table }} +
+
  
+
+ {% 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" %} + -{% block title %}Manage{% endblock title %} + + + + {% block title %} + {% endblock %} + -{% block content %} -
-
- + {% block meta %} + + + + {% endblock %} + + + {% block css %} + {% endblock %} -
-
-

{% block subtitle %} {% endblock %}


- {% block manage %} - {% endblock %} -
- -
+ {% block script %} + {% endblock %} + + + + +
+
+ +
+
+

{% block subtitle %} {% endblock %}


+ {% block manage %} + {% endblock %} +
+ -
-
-
-

© FOSSEE group, IIT Bombay

-
-
-{% endblock content %} +
+
+
+ +
+ + + -- cgit