diff options
author | adityacp | 2020-01-24 10:03:39 +0530 |
---|---|---|
committer | adityacp | 2020-01-24 10:03:39 +0530 |
commit | 547575e98d119a00472efe3d70693ed972468031 (patch) | |
tree | 2fc350741ebf7d78ec62eb2b41f262d53514e612 /yaksh/templates | |
parent | ebbb1b4d3dcec668b901200de7b31253162da80c (diff) | |
parent | 7edfc63ab89d65337e17e8a79e8114a74b2146e3 (diff) | |
download | online_test-547575e98d119a00472efe3d70693ed972468031.tar.gz online_test-547575e98d119a00472efe3d70693ed972468031.tar.bz2 online_test-547575e98d119a00472efe3d70693ed972468031.zip |
Resolve conflicts in grade user, custom filters etc
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/add_question.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/error_template.html | 11 | ||||
-rw-r--r-- | yaksh/templates/yaksh/grade_user.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 8 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 4 |
5 files changed, 22 insertions, 7 deletions
diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html index 692af48..c4cd8a7 100644 --- a/yaksh/templates/yaksh/add_question.html +++ b/yaksh/templates/yaksh/add_question.html @@ -50,7 +50,9 @@ {% for form in formset %} <div class="link-formset well"> + {% autoescape off %} {{ form.as_p }} + {% endautoescape %} </div> {% endfor %} diff --git a/yaksh/templates/yaksh/error_template.html b/yaksh/templates/yaksh/error_template.html index 5530844..00fa306 100644 --- a/yaksh/templates/yaksh/error_template.html +++ b/yaksh/templates/yaksh/error_template.html @@ -1,4 +1,11 @@ +{% block css%} + <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/dashboard.css" type="text/css" /> +{% endblock %} +{% block script %} + <script src="{{ URL_ROOT }}/static/yaksh/js/jquery-ui.js"></script> +{% endblock %} + {% load custom_filters %} {% if error_message %} <div class="container-fluid row justify-content-center"> @@ -64,8 +71,8 @@ </tr> {% for expected,user in error.expected_output|zip:error.user_output %} <td> {{forloop.counter}} </td> - <td>{{expected|default:""}} </td> - <td>{{user|default:""}}</td> + <td>{{expected|default:""|highlight_spaces|safe}} </td> + <td>{{user|default:""|highlight_spaces|safe}}</td> {% if forloop.counter0 in error.error_line_numbers or not expected or not user %} <td><span class ="fa fa-times text-warning"/></td> {% else %} diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 9311590..a8472c7 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -422,7 +422,9 @@ $(document).ready(function() {% endfor %} {% endwith %} {% if question.type == "code" %} - <pre><code>{{ ans.answer.answer.strip }}</code></pre> + {% pygmentise_user_answer question.language ans.answer.answer.strip as user_answer %} + <style type="text/css">{{user_answer.1}}</style> + <pre><code>{{user_answer.0|safe}}</code></pre> {% elif question.type == "mcc" or question.type == "mcq" %} {% for testcases in question.get_test_cases %} {% if testcases.id|stringformat:"i" in ans.answer.answer.strip %} diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index 2ef9655..ff600c3 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -310,7 +310,9 @@ {% endfor %} {% endwith %} {% if question.type == "code" %} - <pre><code>{{ ans.answer.answer.strip }}</code></pre> + {% pygmentise_user_answer question.language ans.answer.answer.strip as user_answer %} + <style type="text/css">{{user_answer.1}}</style> + <pre><code>{{user_answer.0|safe}}</code></pre> {% elif question.type == "mcc" or question.type == "mcq" %} {% for testcases in question.get_test_cases %} {% if testcases.id|stringformat:"i" in ans.answer.answer.strip %} @@ -339,7 +341,7 @@ <div class="col-md-2"> <label class="col-form-label" for="q{{ question.id }}">Marks:</label> {% with answers|last as answer %} - <input id="q{{ question.id }}" type="text" name="q{{ question.id }}_marks" size="4" class="form-control" value="{{ answer.answer.marks }}"><br><br> + <input id="q{{ question.id }}" type="text" name="q{{ question.id }}_marks" size="4" class="form-control" value="{{ answer.answer.marks }}" readonly=""><br><br> {% endwith %} </div> </div> @@ -348,7 +350,7 @@ <div class="form-group"> <h3>Teacher comments: </h3> <textarea id="comments_{{paper.question_paper.id}}" class="form-control" - name="comments_{{ paper.question_paper.id }}">{{ paper.comments }}</textarea> + name="comments_{{ paper.question_paper.id }}" readonly="">{{ paper.comments }}</textarea> </div> </div> </div> diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index b87c818..8e085b6 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -241,7 +241,9 @@ {% endfor %} {% endwith %} <div class="panel-body"> - <pre><code>{{ answer.answer.answer.strip }}</code></pre> + {% pygmentise_user_answer question.language answer.answer.answer.strip as user_answer %} + <style type="text/css">{{user_answer.1}}</style> + <pre><code>{{user_answer.0|safe}}</code></pre> </div> </div> {% endif %} |