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/exam.html') 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 %} -
- {% for error in error_message %} -
-
Error No. {{ forloop.counter }}
-
-
- {% if not error.type %} -
 {{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:

- - - - - - - - - - - {% if error.traceback %} - - - {% endif %} - -
Exception Name: {{error.exception}}
Exception Message: {{error.message}}
Full Traceback:
{{error.traceback}}
- {% elif error.type == 'stdio' %} - {% 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_line_numbers 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_msg}}
- - {% endif %} -
-
-
- {% endfor %} - -
- {% endif %} +
+
+ {% endif %} -- cgit From ae4e2dad126535cda41a7b4a05fdb247f9cdf737 Mon Sep 17 00:00:00 2001 From: mahesh Date: Thu, 23 Nov 2017 01:11:59 +0530 Subject: Render error output with django template instead of javascript --- yaksh/templates/exam.html | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'yaksh/templates/exam.html') diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index f722c5f..fede185 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -33,15 +33,6 @@ {% endblock %} {% block content %} -
+

+ {% if question.type == 'code' or question.type == 'upload' %} -
-
- +
{% endif %} - -- cgit From c5469243a3357a030af0047dac90ae8fbbb77e85 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Thu, 23 Nov 2017 12:59:25 +0530 Subject: Minor changes in requesthandler.js --- yaksh/templates/exam.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yaksh/templates/exam.html') diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index fede185..63c31d6 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -73,11 +73,11 @@
- {% if question.type == 'code' or question.type == 'upload' %}
{% endif %} + {% endblock %} -- cgit From 252449b7b96d73548f53ecd0c3256aa0e777d1dd Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Thu, 23 Nov 2017 13:54:47 +0530 Subject: Put page footer outside div container --- yaksh/templates/exam.html | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'yaksh/templates/exam.html') diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index 63c31d6..6589bb5 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -66,18 +66,11 @@

Question(s) left: {{ paper.questions_left }}

-
{% block main %} {% endblock %}
-
-
- {% if question.type == 'code' or question.type == 'upload' %} -
- {% endif %}
- - + {% endblock %} -- cgit