summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authormaheshgudi2017-02-09 01:36:41 +0530
committermaheshgudi2017-03-02 20:38:41 +0530
commitbb95cc5a42a54e895a0b16d907af3bb9a267990d (patch)
tree9567f4ccaf7c24ac70f22ef0853def08c0b128b9 /yaksh/templates
parenta7a54b43f36571adc5bb999f454fe57e1dcb5c0f (diff)
downloadonline_test-bb95cc5a42a54e895a0b16d907af3bb9a267990d.tar.gz
online_test-bb95cc5a42a54e895a0b16d907af3bb9a267990d.tar.bz2
online_test-bb95cc5a42a54e895a0b16d907af3bb9a267990d.zip
modified answerpaper views for integer, float and string type
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/grade_user.html4
-rw-r--r--yaksh/templates/yaksh/question.html8
-rw-r--r--yaksh/templates/yaksh/user_data.html4
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html4
4 files changed, 13 insertions, 7 deletions
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index 7801b0b..8653dc7 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -140,10 +140,10 @@ Status : <b style="color: green;"> Passed </b><br/>
{% endif %}
{% endfor %}
- {% elif question.type == "integer" %}
+ {% elif question.type == "integer" or "string" or "float" %}
<h5> <u>Correct Answer:</u></h5>
{% for testcase in question.get_test_cases %}
- <strong>{{ testcase.correct }}</strong>
+ <strong>{{ testcase.correct|safe }}</strong>
{% endfor %}
{% else %}
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index 930c57d..bfc90a8 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -153,6 +153,12 @@ function call_skip(url)
(ANSWER IN INTEGER)
{% elif question.type == "string" %}
(ANSWER IN STRING)
+ {% if testcase.string_check == "lower" %}
+ <h5>(CASE INSENSITIVE)</h5>
+ {% else %}
+ <h5>(CASE SENSITIVE)</h5>
+ {% endif %}
+
{% elif question.type == "float" %}
(ANSWER IN FLOAT)
{% endif %}
@@ -217,7 +223,7 @@ function call_skip(url)
{% endif %}
<div class="from-group">
- {% if question.type == "mcq" or question.type == "mcc" or question.type == "integer" %}
+ {% if question.type == "mcq" or "mcc" or "integer" or "float" or "string" %}
<br><button class="btn btn-primary" type="submit" name="check" id="check">Submit Answer</button>&nbsp;&nbsp;
{% elif question.type == "upload" %}
<br><button class="btn btn-primary" type="submit" name="check" id="check" onClick="return validate();">Upload</button>&nbsp;&nbsp;
diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html
index b667676..832e343 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -76,10 +76,10 @@ User IP address: {{ paper.user_ip }}
{% endif %}
{% endfor %}
- {% elif question.type == "integer" %}
+ {{% elif question.type == "integer" or "string" or "float" %}
<h5> <u>Correct Answer:</u></h5>
{% for testcase in question.get_test_cases %}
- <strong>{{ testcase.correct }}</strong>
+ <strong>{{ testcase.correct|safe }}</strong>
{% endfor %}
diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html
index 76369db..633be9e 100644
--- a/yaksh/templates/yaksh/view_answerpaper.html
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -52,10 +52,10 @@
{% endif %}
{% endfor %}
- {% elif question.type == "integer" %}
+ {% elif question.type == "integer" or "string" or "float" %}
<h5> <u>Correct Answer:</u></h5>
{% for testcase in question.get_test_cases %}
- <strong>{{ testcase.correct }}</strong>
+ <strong>{{ testcase.correct|safe }}</strong>
{% endfor %}
{% else %}