summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaheshgudi2017-01-18 15:01:02 +0530
committermaheshgudi2017-01-18 15:22:48 +0530
commit1f66352c1f26eb0688ae0884781e6a6a66d43b18 (patch)
tree9e610b5436165458be16ae7aa45857b292643bd8
parent9d16d8342becd44092e9087b4953fecc7f3e0662 (diff)
downloadonline_test-1f66352c1f26eb0688ae0884781e6a6a66d43b18.tar.gz
online_test-1f66352c1f26eb0688ae0884781e6a6a66d43b18.tar.bz2
online_test-1f66352c1f26eb0688ae0884781e6a6a66d43b18.zip
added bootstrap labels instead of mark tag
-rw-r--r--yaksh/models.py3
-rw-r--r--yaksh/templates/yaksh/grade_user.html10
-rw-r--r--yaksh/templates/yaksh/user_data.html7
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html9
4 files changed, 12 insertions, 17 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 31038f1..8d4f930 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -227,7 +227,6 @@ class Course(models.Model):
students = self.students.exclude(id__in=teachers)
return students
-
def __str__(self):
return self.name
@@ -915,8 +914,6 @@ class AnswerPaperManager(models.Manager):
best_attempt = max([marks["marks_obtained"] for marks in papers])
return best_attempt
-
-
###############################################################################
class AnswerPaper(models.Model):
"""A answer paper for a student -- one per student typically.
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index 2ab5047..b2ee7bc 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -101,7 +101,7 @@ Status : <b style="color: green;"> Passed </b><br/>
{% with answers|last as answer %}
<tr>
<td>{{ question.id }}</td>
- <td>{{ answer.marks }}</td>
+ <td>{{ answer.answer.marks }}</td>
</tr>
{% endwith %}
{% endfor %}
@@ -131,9 +131,9 @@ Status : <b style="color: green;"> Passed </b><br/>
<h5> <u>Choices:</u></h5>
{% for testcase in question.get_test_cases %}
{% if testcase.correct %}
- <br/><strong><mark style="background-color:#4cff00">
- {{ forloop.counter }}. {{ testcase.options|safe }}
- </mark></strong>
+ <br/>
+ <strong>{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ <span class="label label-success"> Correct </span>
{% else %}
<br/><strong>
{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
@@ -166,7 +166,7 @@ Status : <b style="color: green;"> Passed </b><br/>
{% with answers|last as answer %}
Marks: <input id="q{{ question.id }}" type="text"
name="q{{ question.id }}_marks" size="4"
- value="{{ answer.0.marks }}"><br><br>
+ value="{{ answer.answer.marks }}"><br><br>
{% endwith %}
<hr/>
{% endfor %} {# for question, answers ... #}
diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html
index 27c5237..9cc2372 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -67,10 +67,9 @@ User IP address: {{ paper.user_ip }}
<h5> <u>Choices:</u></h5>
{% for testcase in question.get_test_cases %}
{% if testcase.correct %}
- <br/><strong><mark style="background-color:#4cff00">
- {{ forloop.counter }}. {{ testcase.options|safe }}
- </mark>
- </strong>
+ <br/>
+ <strong>{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ <span class="label label-success"> Correct </span>
{% else %}
<br/><strong>
{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html
index 172444f..5240278 100644
--- a/yaksh/templates/yaksh/view_answerpaper.html
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -43,10 +43,9 @@
<h5> <u>Choices:</u></h5>
{% for testcase in question.get_test_cases %}
{% if testcase.correct %}
- <br/><strong><mark style="background-color:#4cff00">
- {{ forloop.counter }}. {{ testcase.options|safe }}
- </mark>
- </strong>
+ <br/>
+ <strong>{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ <span class="label label-success"> Correct</span>
{% else %}
<br/><strong>
{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
@@ -91,7 +90,7 @@
{% endfor %}
{% endif %}
{% with answers|last as answer %}
- <p><em><mark>Obtained Marks: {{answer.marks}}</mark></em> </p>
+ <p><em><mark>Obtained Marks: {{answer.answer.marks}}</mark></em> </p>
{% endwith %}
<hr>
{% endfor %} {# for question, answers ... #}