From bb95cc5a42a54e895a0b16d907af3bb9a267990d Mon Sep 17 00:00:00 2001
From: maheshgudi
Date: Thu, 9 Feb 2017 01:36:41 +0530
Subject: modified answerpaper views for integer, float and string type
---
yaksh/templates/yaksh/grade_user.html | 4 ++--
yaksh/templates/yaksh/question.html | 8 +++++++-
yaksh/templates/yaksh/user_data.html | 4 ++--
yaksh/templates/yaksh/view_answerpaper.html | 4 ++--
4 files changed, 13 insertions(+), 7 deletions(-)
(limited to 'yaksh/templates')
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 : Passed
{% endif %}
{% endfor %}
- {% elif question.type == "integer" %}
+ {% elif question.type == "integer" or "string" or "float" %}
Correct Answer:
{% for testcase in question.get_test_cases %}
- {{ testcase.correct }}
+ {{ testcase.correct|safe }}
{% 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" %}
+ (CASE INSENSITIVE)
+ {% else %}
+ (CASE SENSITIVE)
+ {% endif %}
+
{% elif question.type == "float" %}
(ANSWER IN FLOAT)
{% endif %}
@@ -217,7 +223,7 @@ function call_skip(url)
{% endif %}
- {% if question.type == "mcq" or question.type == "mcc" or question.type == "integer" %}
+ {% if question.type == "mcq" or "mcc" or "integer" or "float" or "string" %}
{% elif question.type == "upload" %}
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" %}
Correct Answer:
{% for testcase in question.get_test_cases %}
- {{ testcase.correct }}
+ {{ testcase.correct|safe }}
{% 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" %}
Correct Answer:
{% for testcase in question.get_test_cases %}
- {{ testcase.correct }}
+ {{ testcase.correct|safe }}
{% endfor %}
{% else %}
--
cgit