summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/add_question.html1
-rw-r--r--yaksh/templates/yaksh/grade_user.html15
-rw-r--r--yaksh/templates/yaksh/question.html1
-rw-r--r--yaksh/templates/yaksh/showquestions.html4
-rw-r--r--yaksh/templates/yaksh/user_data.html20
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html14
6 files changed, 46 insertions, 9 deletions
diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html
index 6bd96d3..5a3b551 100644
--- a/yaksh/templates/yaksh/add_question.html
+++ b/yaksh/templates/yaksh/add_question.html
@@ -8,6 +8,7 @@
{% block script %}
<script src="{{ URL_ROOT }}/static/yaksh/js/add_question.js"></script>
+<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
{% endblock %}
{% block onload %} onload='javascript:textareaformat();' {% endblock %}
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index 8653dc7..73d7060 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -4,6 +4,11 @@
{% block content %}
+{% block script %}
+<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
+{% endblock script %}
+
+
{% if course_details %}
<table id="course-details" class="table table-bordered">
<tr>
@@ -167,7 +172,15 @@ Status : <b style="color: green;"> Passed </b><br/>
<div><pre>{{ err }}</pre></div>
{% endfor %}
</div>
- <div class="panel-body"><pre><code>{{ ans.answer.answer.strip|safe }}</code></pre></div>
+ <div class="panel-body">
+ {% if question.type != "code" %}
+ <div class="well well-sm">
+ {{ ans.answer.answer.strip|safe }}
+ </div>
+ {% else %}
+ <pre><code>{{ ans.answer.answer.strip|safe }}</code></pre>
+ {% endif %}
+ </div>
</div>
{% endfor %}
{% with answers|last as answer %}
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index 3f668cd..1bb95df 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -19,6 +19,7 @@
<script src="{{ URL_ROOT }}/static/yaksh/js/codemirror/mode/python/python.js"></script>
<script src="{{ URL_ROOT }}/static/yaksh/js/codemirror/mode/clike/clike.js"></script>
<script src="{{ URL_ROOT }}/static/yaksh/js/codemirror/mode/shell/shell.js"></script>
+<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
<script>
var time_left = {{ paper.time_left }}
diff --git a/yaksh/templates/yaksh/showquestions.html b/yaksh/templates/yaksh/showquestions.html
index 3668c9e..157b378 100644
--- a/yaksh/templates/yaksh/showquestions.html
+++ b/yaksh/templates/yaksh/showquestions.html
@@ -14,7 +14,8 @@
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ upload_form.as_p }}
-<button class="btn btn-primary" type="submit" name="upload" value="upload">Upload File <span class="glyphicon glyphicon-open"></span></button>
+<button class="btn btn-primary" type="submit" name="upload" value="upload">
+Upload File <span class="glyphicon glyphicon-open"></span></button>
</form>
{% if message %}
<h4>{{ message }}</h4>
@@ -22,6 +23,7 @@
{% if msg %}
<h4>{{ msg }}</h4>
{% endif %}
+<br><br>
<form name=frm action="" method="post">
{% csrf_token %}
<div class="row" id="selectors">
diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html
index aa37703..6e62b66 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -5,7 +5,8 @@
{% block content %}
{% block script %}
- <script src= "{{ URL_ROOT }}/static/yaksh/js/edit_question.js"></script>
+<script src= "{{ URL_ROOT }}/static/yaksh/js/edit_question.js"></script>
+<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
{% endblock %}
<form action="" method="post">
@@ -91,7 +92,7 @@ User IP address: {{ paper.user_ip }}
{%endif%}
</div>
</div>
- {% if question.type == "mcq" or question.type == "mcc" %}
+ {% if question.type != "code" %}
{% if "Correct answer" in answers.0.error_list %}
<div class="panel panel-success">
{% else %}
@@ -102,7 +103,9 @@ User IP address: {{ paper.user_ip }}
</div>
<div class="panel-body">
<h5><u>Student answer:</u></h5>
- <pre><code>{{forloop.counter}}. {{ answers.0.answer|safe }}</code></pre>
+ <div class="well well-sm">
+ {{ answers.0.answer|safe }}
+ </div>
</div>
</div>
{% else %}
@@ -122,7 +125,16 @@ User IP address: {{ paper.user_ip }}
{% endif %}
</div>
- <div class="panel-body"><pre><code>{{ answer.answer.answer.strip }}</code></pre></div>
+ <div class="panel-body">
+ {% if question.type != "code" %}
+ <div class="well well-sg">
+ {{question.type}}
+ {{ answer.answer.answer.strip|safe }}
+ </div>
+ {% else %}
+ <pre><code>{{ answer.answer.answer.strip|safe }}</code></pre>
+ {% endif %}
+ </div>
</div>
{% endfor %}
diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html
index 633be9e..4520ac3 100644
--- a/yaksh/templates/yaksh/view_answerpaper.html
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -2,6 +2,10 @@
{% block pagetitle %} Answer Paper for {{ quiz.description }}{% endblock pagetitle %}
+{% block script %}
+<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
+{% endblock script %}
+
{% block main %}
{% if not data.papers %}
@@ -67,7 +71,7 @@
</div>
</div>
- {% if question.type == "mcq" or question.type == "mcc" %}
+ {% if question.type != "code" %}
{% if "Correct answer" in answers.0.error_list %}
<div class="panel panel-success">
{% else %}
@@ -78,7 +82,9 @@
</div>
<div class="panel-body">
<h5><u>Student answer:</u></h5>
- <pre><code>{{forloop.counter}}. {{ answers.0.answer|safe }}</code></pre>
+ <div class="well well-sm">
+ {{ answers.0.answer|safe }}
+ </div>
</div>
</div>
{% else %}
@@ -91,7 +97,9 @@
<div class="panel panel-danger">
{% endif %}
<div class="panel-heading">Autocheck: {{ answer.error }}</div>
- <div class="panel-body"><pre><code>{{ answer.answer.strip }}</code></pre></div>
+ <div class="panel-body">
+ <pre><code>{{ answer.answer.answer.strip }}</code></pre>
+ </div>
</div>
{% endif %}
{% endfor %}