summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authoradityacp2016-09-02 12:59:20 +0530
committeradityacp2016-09-02 12:59:20 +0530
commit3c1bbe9d8c53c419d2fa2a254228484ea74aab96 (patch)
tree505e646133b52fe56fe1006ad48007cf01c61125 /yaksh/templates
parent83fe192987c239287bf816a31f4da31910eb7087 (diff)
parent01e08dd15b59ce353043d541c9be81592cda3fe0 (diff)
downloadonline_test-3c1bbe9d8c53c419d2fa2a254228484ea74aab96.tar.gz
online_test-3c1bbe9d8c53c419d2fa2a254228484ea74aab96.tar.bz2
online_test-3c1bbe9d8c53c419d2fa2a254228484ea74aab96.zip
refactor in test_models and updated with latest changes
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/base.html1
-rw-r--r--yaksh/templates/manage.html1
-rw-r--r--yaksh/templates/user.html1
-rw-r--r--yaksh/templates/yaksh/login.html1
-rw-r--r--yaksh/templates/yaksh/quizzes_user.html8
-rw-r--r--yaksh/templates/yaksh/user_data.html7
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html61
7 files changed, 76 insertions, 4 deletions
diff --git a/yaksh/templates/base.html b/yaksh/templates/base.html
index 17df0d9..7fe2d27 100644
--- a/yaksh/templates/base.html
+++ b/yaksh/templates/base.html
@@ -16,6 +16,7 @@
<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/base.css">
+ <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/font-awesome.css" type="text/css" />
<style>
body {
diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html
index 334f6a2..2fd0f7a 100644
--- a/yaksh/templates/manage.html
+++ b/yaksh/templates/manage.html
@@ -13,6 +13,7 @@
<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/base.css" type="text/css" />
<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/manage.css" type="text/css" />
+ <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/font-awesome.css" type="text/css" />
{% block css %}
{% endblock %}
<script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/jquery-1.4.2.min.js"></script>
diff --git a/yaksh/templates/user.html b/yaksh/templates/user.html
index 009dd2f..4805c2d 100644
--- a/yaksh/templates/user.html
+++ b/yaksh/templates/user.html
@@ -15,6 +15,7 @@
{% endblock %}
<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/base.css" type="text/css" />
+ <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/font-awesome.css" type="text/css" />
{% block css %}
{% endblock %}
diff --git a/yaksh/templates/yaksh/login.html b/yaksh/templates/yaksh/login.html
index 0a78c1b..5694f75 100644
--- a/yaksh/templates/yaksh/login.html
+++ b/yaksh/templates/yaksh/login.html
@@ -6,7 +6,6 @@
{% block css %}
<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/bootstrap-social.css" type="text/css" />
<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/login.css" type="text/css" />
-<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/font-awesome.css" type="text/css" />
{% endblock %}
{% block content %}
diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html
index 6403a21..98c156b 100644
--- a/yaksh/templates/yaksh/quizzes_user.html
+++ b/yaksh/templates/yaksh/quizzes_user.html
@@ -48,6 +48,7 @@
{% endif %}
<table>
<th>Quiz</th>
+ <th>View Answer Paper</th>
<th>Pre requisite quiz</th>
{% for quiz in quizzes %}
{% if quiz.course_id == course.id %}
@@ -63,6 +64,13 @@
</td>
{% endif %}
<td>
+ {% if quiz.view_answerpaper %}
+ <a href="{{ URL_ROOT }}/exam/view_answerpaper/{{ quiz.questionpaper_set.get.id }}/"><i class="fa fa-eye" aria-hidden="true"></i> Can View </a>
+ {% else%}
+ <a><i class="fa fa-eye-slash" aria-hidden="true"></i> Cannot view now </a>
+ {% endif %}
+ </td>
+ <td>
{% if quiz.prerequisite %}
You have to pass {{ quiz.prerequisite.description }} for taking {{ paper.quiz.description }}
{% else %}
diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html
index 2e7db50..1060e2d 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -50,11 +50,12 @@ User IP address: {{ paper.user_ip }}
<h3> Answers </h3>
{% for question, answers in paper.get_question_answers.items %}
<p><strong> Question: {{ question.id }}. {{ question.summary }} (Points: {{ question.points }})</strong> </p>
-{% if question.type == "mcq" %}
-<p> Choices:
-{% for option in question.options.strip.splitlines %} {{option}}, {% endfor %}
+{% if question.type == "mcq" or question.type == "mcc" %}
+<p> Choices:
+{% for testcase in question.get_test_cases %} <br>{{ testcase.options }} {% endfor %}
</p>
<p>Student answer: {{ answers.0 }}</p>
+Autocheck: {{ answers.0.error }}
{% else %}{# non-mcq questions #}
{% for answer in answers %}
{% if not answer.skipped %}
diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html
new file mode 100644
index 0000000..ae70e69
--- /dev/null
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -0,0 +1,61 @@
+{% extends "user.html" %}
+
+{% block title %} Answer Paper for {{ quiz.description }}{% endblock title %}
+
+{% block manage %}
+
+{% block subtitle %} Answer Paper for {{ quiz.description }}{% endblock %}
+
+
+{% if not data.papers %}
+ <p><b> You have not attempted the quiz {{ quiz.description }} </b></p>
+{% else %}
+ {% for paper in data.papers %}
+ {% if forloop.counter == 2 and data.questionpaperid %}
+ <U><h2> Previous attempts </h2></U>
+ {% endif %}
+ <h2> Quiz: {{ paper.question_paper.quiz.description }} </h2>
+
+ <p>
+ Attempt Number: {{ paper.attempt_number }}<br/>
+ Questions correctly answered: {{ paper.get_answered_str }} <br/>
+ Marks obtained: {{ paper.marks_obtained }} <br/>
+ Start time: {{ paper.start_time }} <br/>
+ </p>
+
+ {% if paper.answers.count %}
+ <h3> Answers </h3>
+ {% for question, answers in paper.get_question_answers.items %}
+ <p><strong> Question: {{ question.id }}. {{ question.summary }} (Mark(s): {{ question.points }})</strong> </p>
+ {% if question.type == "mcq" or question.type == "mcc" %}
+ <p> Choices:
+ {% for testcase in question.get_test_cases %} <br>{{ testcase.options }} {% endfor %}
+ </p>
+ <p>Student answer: {{ answers.0 }}</p>
+ Autocheck: {{ answers.0.error }}
+ {% else %}{# non-mcq questions #}
+ <p>Student answer: </p>
+ {% for answer in answers %}
+ {% if not answer.skipped %}
+ <pre>
+ ###############################################################################
+ {{ answer.answer.strip }}
+ # Autocheck: {{ answer.error }}
+ </pre>
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% with answers|last as answer %}
+ <p><em>Obtained Marks: {{answer.marks}} </em> </p>
+ {% endwith %}
+ <hr>
+ {% endfor %} {# for question, answers ... #}
+ <h3>Teacher comments: </h3>
+ {{ paper.comments|default:"None" }}
+ <hr><hr>
+ {% endif %} {# if paper.answers.count #}
+
+ {% endfor %} {# for paper in data.papers #}
+
+{% endif %} {# if not data.papers #}
+{% endblock %}