summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authormahesh2017-05-16 18:28:49 +0530
committermahesh2017-05-16 18:28:49 +0530
commit6d8e1aa67381cd3b07e4ac89818af2a96ca05668 (patch)
tree7bd6dcc8f764bc47d42fbe2c3b9fe9bfe36c05e1 /yaksh
parentcb1655ea467cf6ed673ed422719c87f2c861723a (diff)
downloadonline_test-6d8e1aa67381cd3b07e4ac89818af2a96ca05668.tar.gz
online_test-6d8e1aa67381cd3b07e4ac89818af2a96ca05668.tar.bz2
online_test-6d8e1aa67381cd3b07e4ac89818af2a96ca05668.zip
added wordwrap for error output table
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/static/yaksh/css/exam.css8
-rw-r--r--yaksh/templates/exam.html19
-rw-r--r--yaksh/templates/yaksh/question.html2
3 files changed, 18 insertions, 11 deletions
diff --git a/yaksh/static/yaksh/css/exam.css b/yaksh/static/yaksh/css/exam.css
index 88111dc..fff904e 100644
--- a/yaksh/static/yaksh/css/exam.css
+++ b/yaksh/static/yaksh/css/exam.css
@@ -1 +1,7 @@
-.table td { border: black solid 1px !important; } \ No newline at end of file
+table td, table th { border: black solid 1px !important;
+ word-wrap: break-word !important;
+ white-space: pre-wrap !important;
+ }
+output{
+ table-layout: fixed
+} \ No newline at end of file
diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html
index b5b6c46..f349b2f 100644
--- a/yaksh/templates/exam.html
+++ b/yaksh/templates/exam.html
@@ -86,32 +86,33 @@
<pre><code> {{error|safe}} </code></pre>
{% else %}
{% if error.given_input %}
- <table class="table table-bordered" width="100%">
+ <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%">
+ <table class="table table-bordered" width="100%" id="output">
<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>
+ <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_no or not expected or not user %}
- <td><span class ="glyphicon glyphicon-remove text-warning"></td>
+ <td><span class ="glyphicon glyphicon-remove text-warning"/></td>
{% else %}
- <td><span class ="glyphicon glyphicon-ok text-success"></td>
+ <td><span class ="glyphicon glyphicon-ok text-success"/></td>
{% endif %}
</tr>
{% endfor %}
@@ -121,7 +122,7 @@
<tr class = "danger">
<td><b>Error:</b></td>
<td>{{error.error}}</td>
-
+ </tr>
</table>
{% endif %}
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index e1cdcf8..ee33523 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -239,7 +239,7 @@ function call_skip(url)
<div class="from-group">
{% if question.type == "mcq" or "mcc" or "integer" or "float" or "string" %}
- <br><button class="btn btn-primary" type="submit" name="check" id="check">Submit Answer</button>&nbsp;&nbsp;
+ <br><button class="btn btn-primary" type="submit" name="check" id="check">Submit Answer</button>&nbsp;&nbsp;<br/>
{% elif question.type == "upload" %}
<br><button class="btn btn-primary" type="submit" name="check" id="check" onClick="return validate();">Upload</button>&nbsp;&nbsp;