diff options
author | mahesh | 2017-05-12 18:25:53 +0530 |
---|---|---|
committer | mahesh | 2017-05-12 18:25:53 +0530 |
commit | d6a757f14d6b76c8124d52057cc981403d28d71a (patch) | |
tree | c256df95105a0db79f9489c30c9e995bbfa4b2bd /yaksh/templates | |
parent | b6993d79ae2f0d18375555f5ada72b52a3a2e066 (diff) | |
download | online_test-d6a757f14d6b76c8124d52057cc981403d28d71a.tar.gz online_test-d6a757f14d6b76c8124d52057cc981403d28d71a.tar.bz2 online_test-d6a757f14d6b76c8124d52057cc981403d28d71a.zip |
changed stdio output
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/exam.html | 53 | ||||
-rw-r--r-- | yaksh/templates/yaksh/question.html | 1 |
2 files changed, 49 insertions, 5 deletions
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%} <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/dashboard.css" type="text/css" /> {% endblock %} @@ -77,13 +78,55 @@ {% if error_message %} <div class="row" id="error_panel"> {% for error in error_message %} - {% if error == "Correct answer" %} - <div class="panel panel-success"> - {% else %} <div class="panel panel-danger"> - {% endif %} <div class="panel-heading">Testcase No. {{ forloop.counter }}</div> - <div class="panel-body"><pre><code>{{ error }}</code></pre></div> + <div class="panel-body"> + <div class="well well-sm"> + {% if not error.expected_output %} + <pre><code> {{error|safe}} </code></pre> + {% else %} + {% if error.given_input %} + <table class="table table-bordered" width="100%"> + <col width="30%"> + <tr class = "active"> + <td> For given Input value(s):</td> + <td>{{error.given_input}}</td> + </table> + {% endif %} + <table class="table table-bordered" width="100%"> + <col width="10%"> + <col width="40%"> + <col width="40%"> + <col width="10%"> + <tr class="info"> + <td><b><center>Line No.</center></b></td> + <td><b><center>Expected Output</center></b></td> + <td><b><center>User output</center></b></td> + <td><b><center>Status</center></b></td> + </tr> + {% for expected,user in error.expected_output|zip:error.user_output %} + <td> {{forloop.counter}} </td> + <td>{{expected|default:""}} </td> + <td>{{user|default:""}}</td> + {% if forloop.counter0 in error.error_no or not expected or not user %} + <td><span class ="glyphicon glyphicon-remove text-warning"></td> + {% else %} + <td><span class ="glyphicon glyphicon-ok text-success"></td> + {% endif %} + </tr> + {% endfor %} + </table> + <table width="100%" class='table table-bordered'> + <col width="10"> + <tr class = "danger"> + <td><b>Error:</b></td> + <td>{{error.error}}</td> + + </table> + + {% endif %} + </div> + </div> </div> {% 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 @@ <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/dashboard.css" type="text/css" /> <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/question.css" type="text/css" /> <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/codemirror/lib/codemirror.css" type="text/css" /> +<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/exam.css" type="text/css" /> <style> .CodeMirror{ border-style: groove; |