diff options
author | adityacp | 2017-03-17 22:08:45 +0530 |
---|---|---|
committer | adityacp | 2017-03-17 22:08:45 +0530 |
commit | f29b18cdb0062e124a8f534bebde112e31d308c5 (patch) | |
tree | 85ab68365da6f05263c614a230c2ec0fb17c5c8b /yaksh/templates | |
parent | b4b33cc37244ed59765c705c6d882c00ddc88c62 (diff) | |
parent | 23ecd8fa33e7fa2e953aa9715ae45a2869a044a0 (diff) | |
download | online_test-f29b18cdb0062e124a8f534bebde112e31d308c5.tar.gz online_test-f29b18cdb0062e124a8f534bebde112e31d308c5.tar.bz2 online_test-f29b18cdb0062e124a8f534bebde112e31d308c5.zip |
Merge https://github.com/fossee/online_test into assignment_upload_check
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/add_question.html | 1 | ||||
-rw-r--r-- | yaksh/templates/yaksh/grade_user.html | 15 | ||||
-rw-r--r-- | yaksh/templates/yaksh/question.html | 1 | ||||
-rw-r--r-- | yaksh/templates/yaksh/showquestions.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 20 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 14 |
6 files changed, 46 insertions, 9 deletions
diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html index ae70774..0d54ef7 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 63ff5eb..d20695b 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> @@ -160,7 +165,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 2a93cfb..dc8a165 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 16707b2..6679599 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"> @@ -83,7 +84,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 %} @@ -94,7 +95,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 %} @@ -114,7 +117,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 5eb55df..f4edf67 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 %} @@ -60,7 +64,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 %} @@ -71,7 +75,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 %} @@ -84,7 +90,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 %} |