From 861d2cc5e36835f60bace61a919e73b4bd27274b Mon Sep 17 00:00:00 2001 From: parth Date: Fri, 9 Dec 2011 04:02:19 +0530 Subject: Moved all the apps to testapp folder --- testapp/templates/404.html | 5 ++ testapp/templates/500.html | 7 +++ testapp/templates/base.html | 25 ++++++++++ testapp/templates/exam/complete.html | 12 +++++ testapp/templates/exam/grade_user.html | 83 +++++++++++++++++++++++++++++++ testapp/templates/exam/intro.html | 53 ++++++++++++++++++++ testapp/templates/exam/login.html | 20 ++++++++ testapp/templates/exam/monitor.html | 67 +++++++++++++++++++++++++ testapp/templates/exam/question.html | 91 ++++++++++++++++++++++++++++++++++ testapp/templates/exam/quit.html | 14 ++++++ testapp/templates/exam/register.html | 17 +++++++ testapp/templates/exam/user_data.html | 84 +++++++++++++++++++++++++++++++ 12 files changed, 478 insertions(+) create mode 100644 testapp/templates/404.html create mode 100644 testapp/templates/500.html create mode 100644 testapp/templates/base.html create mode 100644 testapp/templates/exam/complete.html create mode 100644 testapp/templates/exam/grade_user.html create mode 100644 testapp/templates/exam/intro.html create mode 100644 testapp/templates/exam/login.html create mode 100644 testapp/templates/exam/monitor.html create mode 100644 testapp/templates/exam/question.html create mode 100644 testapp/templates/exam/quit.html create mode 100644 testapp/templates/exam/register.html create mode 100644 testapp/templates/exam/user_data.html (limited to 'testapp/templates') diff --git a/testapp/templates/404.html b/testapp/templates/404.html new file mode 100644 index 0000000..7d33dd3 --- /dev/null +++ b/testapp/templates/404.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block content %} +The requested page does not exist. +{% endblock %} diff --git a/testapp/templates/500.html b/testapp/templates/500.html new file mode 100644 index 0000000..d02721f --- /dev/null +++ b/testapp/templates/500.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} + +{% block content %} +Internal Server error.
+This event will be reported.
+Sorry for the inconvinience. +{% endblock %} diff --git a/testapp/templates/base.html b/testapp/templates/base.html new file mode 100644 index 0000000..c2bbabb --- /dev/null +++ b/testapp/templates/base.html @@ -0,0 +1,25 @@ + + + + + +{% block title %} +{% endblock %} + +{% block meta %} +{% endblock %} + +{% block css %} +{% endblock %} +{% block script %} +{% endblock %} + + + +
+{% block content %} +{% endblock %} +
+ + diff --git a/testapp/templates/exam/complete.html b/testapp/templates/exam/complete.html new file mode 100644 index 0000000..4c3f3d5 --- /dev/null +++ b/testapp/templates/exam/complete.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block title %}Good bye!{% endblock %} + +{% block content %} +

Good bye!

+ +

{{message}}

+
+

You may now close the browser.

+ +{% endblock content %} diff --git a/testapp/templates/exam/grade_user.html b/testapp/templates/exam/grade_user.html new file mode 100644 index 0000000..75ed2e0 --- /dev/null +++ b/testapp/templates/exam/grade_user.html @@ -0,0 +1,83 @@ +{% extends "base.html" %} + +{% block title %} Grading papers for {{ data.user.get_full_name.title }} {% endblock title %} + +{% block content %} + +

Grading papers for {{ data.user.get_full_name.title }}

+ +

+Name: {{ data.user.get_full_name.title }} +{% if data.profile %} +(roll number: {{ data.profile.roll_number }})
+{{ data.profile.position }}, +{{ data.profile.department }}, +{{ data.profile.institute }} +{% endif %} +

+ +{% if data.papers %} + +{% for paper in data.papers %} + +

Quiz: {{ paper.quiz.description }}

+ +

+Questions correctly answered: {{ paper.get_answered_str }}
+Total attempts at questions: {{ paper.answers.count }}
+Marks obtained: {{ paper.get_total_marks }}
+Start time: {{ paper.start_time }}
+

+ +{% if paper.answers.count %} +

Answers

+
+{% csrf_token %} +{% for question, answers in paper.get_question_answers.items %} +

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

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

Choices: +{% for option in question.options.strip.splitlines %} {{option}}, {% endfor %} +

+

Student answer: {{ answers.0 }}

+{% else %}{# non-mcq questions #} +
+{% for answer in answers %}################################################################################
+{{ answer.answer.strip }}
+# Autocheck: {{ answer.error }}
+{% endfor %}
+{% endif %} {# if question.type #} +{% with answers|last as answer %} +Marks: +{% endwith %} +{% endfor %} {# for question, answers ... #} +

Teacher comments:

+ +
+ +
+{% endif %} {# if paper.answers.count #} + +{% endfor %} {# for paper in data.papers #} + +{% endif %} {# if data.papers #} + +{% if data.papers.count > 1 %} + + Monitor quiz +{% else %} +{% with data.papers.0 as paper %} + + Monitor quiz +{% endwith %} +{% endif %} +
+Admin +{% endblock content %} diff --git a/testapp/templates/exam/intro.html b/testapp/templates/exam/intro.html new file mode 100644 index 0000000..1d3e5de --- /dev/null +++ b/testapp/templates/exam/intro.html @@ -0,0 +1,53 @@ +{% extends "base.html" %} + +{% block title %}Instructions and Rules {% endblock %} + +{% block content %} +

Important rules and instructions

+ +

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 +learn programming and be assessed in an interactive and fun manner. +You will be presented with a series of programming questions and problems that +you will answer online and get immediate feedback for. +

+ +

Here are some important instructions and rules that you should understand +carefully. +

+ + + +

We hope you enjoy taking this exam.

+ +
+{% csrf_token %} + +
+ +{% endblock content %} \ No newline at end of file diff --git a/testapp/templates/exam/login.html b/testapp/templates/exam/login.html new file mode 100644 index 0000000..8e6352e --- /dev/null +++ b/testapp/templates/exam/login.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} + +{% block title %}Login{% endblock title %} + +{% block content %} +

Welcome to the Examination. +Please login to proceed.

+ +
+{% csrf_token %} + + +{{ form.as_table }} +
+ + +
+ +New User Registration +{% endblock content %} \ No newline at end of file diff --git a/testapp/templates/exam/monitor.html b/testapp/templates/exam/monitor.html new file mode 100644 index 0000000..fb6cb58 --- /dev/null +++ b/testapp/templates/exam/monitor.html @@ -0,0 +1,67 @@ +{% extends "base.html" %} + +{% block title %} Quiz results {% endblock title %} + +{% block meta %} {% endblock meta %} + +{% block content %} + +{% if not quizzes and not quiz %} +

Quiz results

+ +

No quizzes available.

+ +{% endif %} + +{# ############################################################### #} +{# This is rendered when we are just viewing exam/monitor #} +{% if quizzes %} +

Available quizzes

+ + +{% endif %} + +{# ############################################################### #} +{# This is rendered when we are just viewing exam/monitor/quiz_num #} +{% if quiz %} +

{{ quiz.description }} results

+{% if papers %} +{#

Quiz: {{ quiz_name }}

#} +

Number of papers: {{ papers|length }}

+ + + + + + + + + + + + {% for paper in papers %} + + + + + + + + + + {% endfor %} +
Name Username Roll number Institute Questions answered Total marks Attempts
+ {{ paper.user.get_full_name.title }} + {{ paper.user.username }} {{ paper.profile.roll_number }} {{ paper.profile.institute }} {{ paper.get_answered_str }} {{ paper.get_total_marks }} {{ paper.answers.count }}
+{% else %} +

No answer papers so far.

+{% endif %} {# if papers #} +{% endif %} + +Admin + +{% endblock content %} diff --git a/testapp/templates/exam/question.html b/testapp/templates/exam/question.html new file mode 100644 index 0000000..8b589b6 --- /dev/null +++ b/testapp/templates/exam/question.html @@ -0,0 +1,91 @@ +{% extends "base.html" %} + +{% block title %} Answer question {% endblock %} + +{% block script %} + +{% endblock script %} + +{% block onload %} onload="update_time()" {% endblock %} + +{% block content %} +

{{ question.summary }}

+ +

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

+ +{% if error_message %}

ERROR:

{{ error_message }}
{% endif %} + +

+ +
+{% csrf_token %} +{% if question.type == "mcq" %} +{% for option in question.options.strip.splitlines %} +{{option}}
+{% endfor %} +{% else %} + +{% endif %} +
+{% if question.type == "mcq" %} + +{% else %} + +{% endif %} + +
+ +

{{ user.first_name.title }} {{ user.last_name.title }}, +you have {{ paper.questions_left }} question(s) left in {{ quiz_name }}.

+ +

Time left:

+ +
+
+{% csrf_token %} + +
+ +{% endblock content %} diff --git a/testapp/templates/exam/quit.html b/testapp/templates/exam/quit.html new file mode 100644 index 0000000..37b5c08 --- /dev/null +++ b/testapp/templates/exam/quit.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block title %}Quit exam {% endblock %} + +{% block content %} +

Your current answers are saved.

+

Are you sure you wish to quit the exam?

+ +
+{% csrf_token %} + + +
+{% endblock content %} \ No newline at end of file diff --git a/testapp/templates/exam/register.html b/testapp/templates/exam/register.html new file mode 100644 index 0000000..921e7b5 --- /dev/null +++ b/testapp/templates/exam/register.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block title %}Registration form {% endblock %} + +{% block content %} +Please provide the following details. +
+{% csrf_token %} + + +{{ form.as_table }} +
+ + +
+ +{% endblock content %} \ No newline at end of file diff --git a/testapp/templates/exam/user_data.html b/testapp/templates/exam/user_data.html new file mode 100644 index 0000000..9fb442a --- /dev/null +++ b/testapp/templates/exam/user_data.html @@ -0,0 +1,84 @@ +{% extends "base.html" %} + +{% block title %} Data for user {{ data.user.get_full_name.title }} {% endblock title %} + +{% block content %} + +

Data for user {{ data.user.get_full_name.title }}

+ +

+Name: {{ data.user.get_full_name.title }}
+Username: {{ data.user.username }}
+{% if data.profile %} +Roll number: {{ data.profile.roll_number }}
+Position: {{ data.profile.position }}
+Department: {{ data.profile.department }}
+Institute: {{ data.profile.institute }}
+{% endif %} +Email: {{ data.user.email }}
+Date joined: {{ data.user.date_joined }}
+Last login: {{ data.user.last_login }} +

+ +{% if data.papers %} +

+ Grade/correct paper +

+ +{% for paper in data.papers %} + +

Quiz: {{ paper.quiz.description }}

+ +

+Questions correctly answered: {{ paper.get_answered_str }}
+Total attempts at questions: {{ paper.answers.count }}
+Marks obtained: {{ paper.get_total_marks }}
+Start time: {{ paper.start_time }}
+User IP address: {{ paper.user_ip }} +

+ +{% if paper.answers.count %} +

Answers

+{% for question, answers in paper.get_question_answers.items %} +

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

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

Choices: +{% for option in question.options.strip.splitlines %} {{option}}, {% endfor %} +

+

Student answer: {{ answers.0 }}

+{% else %}{# non-mcq questions #} +
 
+{% for answer in answers %}################################################################################
+{{ answer.answer.strip }}
+# Autocheck: {{ answer.error }}
+{% endfor %}
+{% endif %} +{% with answers|last as answer %} +

Marks: {{answer.marks}}

+{% endwith %} +{% endfor %} {# for question, answers ... #} +

Teacher comments:

+{{ paper.comments|default:"None" }} +{% endif %} {# if paper.answers.count #} + +{% endfor %} {# for paper in data.papers #} + +{% endif %} {# if data.papers #} +
+
+ + Grade/correct paper +
+{% if data.papers.count > 1 %} + + Monitor quiz +{% else %} +{% with data.papers.0 as paper %} + + Monitor quiz +{% endwith %} +{% endif %} +
+Admin + +{% endblock content %} -- cgit