From 7e2972786599fc23c436e593fcc236defd93c88c Mon Sep 17 00:00:00 2001
From: maheshgudi
Date: Wed, 22 Nov 2017 20:49:07 +0530
Subject: Display error output without reloading.
---
yaksh/templates/exam.html | 83 ++---------------------------------------------
1 file changed, 3 insertions(+), 80 deletions(-)
(limited to 'yaksh/templates')
diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html
index a1f0df4..f722c5f 100644
--- a/yaksh/templates/exam.html
+++ b/yaksh/templates/exam.html
@@ -82,86 +82,9 @@
{% if question.type == 'code' or question.type == 'upload' %}
- {% if error_message %}
-
{{error|safe}}
- {% elif error.type == 'assertion' %}
- {% if error.test_case %}
- We tried your code with the following test case:{{error.test_case}}
- {% endif %}
- The following error took place:
-Exception Name: | -{{error.exception}} | -
Exception Message: | {{error.message}} | -
Full Traceback: | -{{error.traceback}} |
- {% endif %}
-
For given Input value(s): | -{{error.given_input}} | -
{{forloop.counter}} | -{{expected|default:""}} | -{{user|default:""}} | - {% if forloop.counter0 in error.error_line_numbers or not expected or not user %} -- {% else %} - | - {% endif %} - - {% endfor %} - |
Error: | -{{error.error_msg}} | -
{{error|safe}}
+
+ {% elif error.type == 'assertion' %}
+
+ {% if error.test_case %}
+ We tried your code with the following test case:
+
+ {{error.test_case}}
+
+ {% endif %}
+ The following error took place:
+Exception Name: | +{{error.exception}} | +
Exception Message: | {{error.message}} | +
Full Traceback: | +{{error.traceback}} |
+ {% endif %}
+
For given Input value(s): | +{{error.given_input}} | +
{{forloop.counter}} | +{{expected|default:""}} | +{{user|default:""}} | + {% if forloop.counter0 in error.error_line_numbers or not expected or not user %} ++ {% else %} + | + {% endif %} + + {% endfor %} + |
Error: | +{{error.error_msg}} | +