summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorPrabhu Ramachandran2016-08-30 16:29:03 +0530
committerGitHub2016-08-30 16:29:03 +0530
commitaefc8eed3b0c18520059b4005978f1db9cf5591b (patch)
tree6be0dc028784f4db97115f3b4b2bd0d02c2a0262 /yaksh/templates
parentfb1877472b80b45d51e926966d6d21ca80b9ae9f (diff)
parent45cfca69a8af52fb838de48706ed5e4ddc1b1042 (diff)
downloadonline_test-aefc8eed3b0c18520059b4005978f1db9cf5591b.tar.gz
online_test-aefc8eed3b0c18520059b4005978f1db9cf5591b.tar.bz2
online_test-aefc8eed3b0c18520059b4005978f1db9cf5591b.zip
Merge pull request #128 from prathamesh920/bug_fixes
Bug fixes
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/question.html21
-rw-r--r--yaksh/templates/yaksh/user_data.html10
2 files changed, 14 insertions, 17 deletions
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index 73d851a..9a0f899 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -85,19 +85,6 @@ function call_skip(url)
form.action = url
form.submit();
}
- {% if error_message == 'Correct Output'%}
- {% if paper.questions_left %}
- window.setTimeout(function()
- {
- location.href="{{ URL_ROOT }}/exam/{{ paper.current_question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/"
- }, 2000);
- {% else %}
- window.setTimeout(function()
- {
- location.href="{{ URL_ROOT }}/exam/{{ question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/"
- }, 2000);
- {% endif %}
- {% endif %}
</script>
{% endblock script %}
@@ -165,11 +152,17 @@ function call_skip(url)
<input type=hidden name="question_id" id="question_id" value={{ question.id }}></input>
{% if question.type == "mcq" %}
+ {% if error_message %}
+ <p>{{ error_message }}</p>
+ {% endif %}
{% for test_case in test_cases %}
<input name="answer" type="radio" value="{{ test_case.options }}" />{{ test_case.options }} <br/>
{% endfor %}
{% endif %}
{% if question.type == "mcc" %}
+ {% if error_message %}
+ <p>{{ error_message }}</p>
+ {% endif %}
{% for test_case in test_cases %}
<input name="answer" type="checkbox" value="{{ test_case.options }}"> {{ test_case.options }}
<br>
@@ -188,7 +181,7 @@ function call_skip(url)
{% endif %}
- {% if question.type == "mcq" or question.type == "mcc "%}
+ {% if question.type == "mcq" or question.type == "mcc"%}
<br><button class="btn" type="submit" name="check" id="check">Submit Answer</button>&nbsp;&nbsp;
{% elif question.type == "upload" %}
<br><button class="btn" 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 04544f9..2e7db50 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -56,11 +56,15 @@ User IP address: {{ paper.user_ip }}
</p>
<p>Student answer: {{ answers.0 }}</p>
{% else %}{# non-mcq questions #}
-<pre>
-{% for answer in answers %}################################################################################
+{% for answer in answers %}
+{% if not answer.skipped %}
+<pre>
+###############################################################################
{{ answer.answer.strip }}
# Autocheck: {{ answer.error }}
-{% endfor %}</pre>
+</pre>
+{% endif %}
+{% endfor %}
{% endif %}
{% with answers|last as answer %}
<p><em>Marks: {{answer.marks}} </em> </p>