diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/exam.html | 83 |
1 files changed, 3 insertions, 80 deletions
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 @@ </div> <br/> {% if question.type == 'code' or question.type == 'upload' %} - {% if error_message %} - <div class="row" id="error_panel"> - {% for error in error_message %} - <div class="panel panel-danger"> - <div class="panel-heading">Error No. {{ forloop.counter }}</div> - <div class="panel-body"> - <div class="well well-sm"> - {% if not error.type %} - <pre><code> {{error|safe}} </code></pre> - {% elif error.type == 'assertion' %} - {% if error.test_case %} - <strong> We tried your code with the following test case:</strong><br/></br> - <pre><code><strong style="color:#d9534f">{{error.test_case}}</strong></code></pre> - {% endif %} - <p> <b>The following error took place: </b></p> - <table class="table table-bordered" width="100%" id='assertion'> - <col width="30%"> - <tr class = "active"> - <td><b>Exception Name: </b></td> - <td><span style="color: #d9534f">{{error.exception}}</span></td> - </tr> - <tr> - <td><b>Exception Message: </b></td><td>{{error.message}}</td> - </tr> - <tr> - {% if error.traceback %} - <td><b>Full Traceback: </b></td> - <td><pre>{{error.traceback}}</pre></td> - {% endif %} - </tr> - </table> - {% elif error.type == 'stdio' %} - {% if error.given_input %} - <table class="table table-bordered"> - <col width="30%"> - <tr class = "active"> - <td> For given Input value(s):</td> - <td>{{error.given_input}}</td> - </tr> - </table> - {% endif %} - <table class="table table-bordered" width="100%" id="stdio"> - <col width="10%"> - <col width="40%"> - <col width="40%"> - <col width="10%"> - <tr class="info"> - <th><center>Line No.</center></th> - <th><center>Expected Output</center></th> - <th><center>User output</center></th> - <th><center>Status</center></th> - </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_line_numbers 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_msg}}</td> - </tr> - </table> - - {% endif %} - </div> - </div> - </div> - {% endfor %} - - </div> - {% endif %} + <div class="row" id="error_panel"> + </div> + </div> {% endif %} </div> </div> |