From d6a757f14d6b76c8124d52057cc981403d28d71a Mon Sep 17 00:00:00 2001 From: mahesh Date: Fri, 12 May 2017 18:25:53 +0530 Subject: changed stdio output --- yaksh/templates/exam.html | 53 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 5 deletions(-) (limited to 'yaksh/templates/exam.html') diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index a18a962..b5b6c46 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load custom_filters %} {% block css%} {% endblock %} @@ -77,13 +78,55 @@ {% if error_message %}
{% for error in error_message %} - {% if error == "Correct answer" %} -
- {% else %}
- {% endif %}
Testcase No. {{ forloop.counter }}
-
{{ error }}
+
+
+ {% if not error.expected_output %} +
 {{error|safe}} 
+ {% else %} + {% if error.given_input %} + + + + + +
For given Input value(s):{{error.given_input}}
+ {% endif %} + + + + + + + + + + + + {% for expected,user in error.expected_output|zip:error.user_output %} + + + + {% if forloop.counter0 in error.error_no or not expected or not user %} + + {% else %} + + {% endif %} + + {% endfor %} +
Line No.
Expected Output
User output
Status
{{forloop.counter}} {{expected|default:""}} {{user|default:""}}
+ + + + + + +
Error:{{error.error}}
+ + {% endif %} +
+
{% endfor %} -- cgit From 6d8e1aa67381cd3b07e4ac89818af2a96ca05668 Mon Sep 17 00:00:00 2001 From: mahesh Date: Tue, 16 May 2017 18:28:49 +0530 Subject: added wordwrap for error output table --- yaksh/templates/exam.html | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'yaksh/templates/exam.html') diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index b5b6c46..f349b2f 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -86,32 +86,33 @@
 {{error|safe}} 
{% else %} {% if error.given_input %} - +
+
For given Input value(s): {{error.given_input}}
{% endif %} - +
- - - - + + + + {% for expected,user in error.expected_output|zip:error.user_output %} {% if forloop.counter0 in error.error_no or not expected or not user %} - + {% else %} - + {% endif %} {% endfor %} @@ -121,7 +122,7 @@ - +
Line No.
Expected Output
User output
Status
Line No.
Expected Output
User output
Status
{{forloop.counter}} {{expected|default:""}} {{user|default:""}}
Error: {{error.error}}
{% endif %} -- cgit From 77f05d3df90a70ff97285deb5bda2d91d99e65d5 Mon Sep 17 00:00:00 2001 From: mahesh Date: Mon, 22 May 2017 14:32:47 +0530 Subject: changes variable and dict key names along with other minor changes in answerpaper. --- yaksh/templates/exam.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'yaksh/templates/exam.html') diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index f349b2f..45b85f0 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -109,7 +109,7 @@ {{forloop.counter}} {{expected|default:""}} {{user|default:""}} - {% if forloop.counter0 in error.error_no or not expected or not user %} + {% if forloop.counter0 in error.error_line_numbers or not expected or not user %} {% else %} @@ -121,7 +121,7 @@ Error: - {{error.error}} + {{error.error_msg}} -- cgit