diff options
author | ankitjavalkar | 2019-12-18 13:50:42 +0530 |
---|---|---|
committer | ankitjavalkar | 2019-12-18 13:50:42 +0530 |
commit | 8c9a3592a86bc6f601701a7ddee2b63f6095b7b7 (patch) | |
tree | 7f43d2a37b43c17fed1bdb4b9abaf2f9f43d9526 /yaksh/templates | |
parent | 417b139cf64a85b211ce878cb45cc069fd1ce520 (diff) | |
parent | 3fe840b52e4d780587f14d06a46fcab523ba23c3 (diff) | |
download | online_test-8c9a3592a86bc6f601701a7ddee2b63f6095b7b7.tar.gz online_test-8c9a3592a86bc6f601701a7ddee2b63f6095b7b7.tar.bz2 online_test-8c9a3592a86bc6f601701a7ddee2b63f6095b7b7.zip |
Fix conflicts for pygmentized answer paper
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/grade_user.html | 6 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index a76f2c7..b1edba5 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -311,7 +311,9 @@ Status : <b style="color: red;"> Failed </b><br/> <div class="card-body"> {% 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"%} <div class="card"> <div class="card-body"> @@ -346,7 +348,7 @@ Status : <b style="color: red;"> Failed </b><br/> {% else %} <div class="card"> <div class="card-body"> - {{ ans.answer.answer.strip }} + {{ ans.answer.answer.strip|safe }} </div> </div> {% endif %} diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index 317cb15..687dc48 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -223,7 +223,9 @@ </div> <div class="card-body"> {% if question.type == "code" %} - <pre><code>{{ ans.answer.answer.strip|safe }}</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> {% elif question.type == "mcc"%} <div class="card"> <div class="card-body"> 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 %} |