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 +++++++++++++++++++++++++++++++++---- yaksh/templates/yaksh/question.html | 1 + 2 files changed, 49 insertions(+), 5 deletions(-) (limited to 'yaksh/templates') 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 %} diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index 0dad59d..e1cdcf8 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -6,6 +6,7 @@ +