summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authormaheshgudi2017-10-25 13:16:16 +0530
committermaheshgudi2017-10-25 13:16:16 +0530
commiteaf1735f748279f3c9c313375c51f2f886292934 (patch)
tree57bbcb78ac88ddedd2f3544e115680fe0ab0a028 /yaksh/templates
parent52c0408298a5559cb24f7e2f4251b207546c7d22 (diff)
parente45b9cce359567c28001b34e1ccd14b51130cdb3 (diff)
downloadonline_test-eaf1735f748279f3c9c313375c51f2f886292934.tar.gz
online_test-eaf1735f748279f3c9c313375c51f2f886292934.tar.bz2
online_test-eaf1735f748279f3c9c313375c51f2f886292934.zip
Merge branch '0.7_bugfix' of https://github.com/maheshgudi/online_test into 0.7_bugfix
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/course_detail.html4
-rw-r--r--yaksh/templates/yaksh/question.html4
-rw-r--r--yaksh/templates/yaksh/showquestions.html2
-rw-r--r--yaksh/templates/yaksh/user_data.html14
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html12
5 files changed, 20 insertions, 16 deletions
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html
index bcada42..d8aeb2e 100644
--- a/yaksh/templates/yaksh/course_detail.html
+++ b/yaksh/templates/yaksh/course_detail.html
@@ -6,13 +6,11 @@
{% block script %}
<script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/course.js"></script>
-<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.5.1/js/froala_editor.min.js"></script>
+<script type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/tinymce/js/tinymce/tinymce.min.js"></script>
<script src="https://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
{% endblock %}
{% block css %}
<link rel="stylesheet" href="https://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css">
-<link href="https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.5.1/css/froala_editor.min.css" rel="stylesheet" type="text/css" />
-<link href="https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.5.1/css/froala_style.min.css" rel="stylesheet" type="text/css" />
{% endblock %}
{% block content %}
<br/>
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index 1e1f38f..fa69b76 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -184,11 +184,11 @@ lang = "{{ question.language }}"
{% if question.type == "mcc" %}
{% for test_case in test_cases %}
{% if last_attempt and test_case.id|safe in last_attempt|safe %}
- <input name="answer" type="checkbox" value="{{ test_case.id }}" checked/> {{ test_case.options }}
+ <input name="answer" type="checkbox" value="{{ test_case.id }}" checked/> {{ test_case.options| safe }}
<br>
{% else %}
<input name="answer" type="checkbox" value="{{ test_case.id }}">
- {{ test_case.options}}
+ {{ test_case.options| safe }}
<br/>
{% endif %}
{% endfor %}
diff --git a/yaksh/templates/yaksh/showquestions.html b/yaksh/templates/yaksh/showquestions.html
index a8983bd..4240b2e 100644
--- a/yaksh/templates/yaksh/showquestions.html
+++ b/yaksh/templates/yaksh/showquestions.html
@@ -18,7 +18,7 @@
<li><a href="#updown" data-toggle="pill" > Upload and Download Questions</a></li>
</ul>
</div>
-<div class="tab-content">
+<div class="tab-content col-md-9 col-md-offset-2 main">
<!-- Upload Questions -->
<div id="updown" class="tab-pane fade">
<a class="btn btn-primary" href="{{URL_ROOT}}/exam/manage/courses/download_yaml_template/"> Download Template</a>
diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html
index 31a023d..6dfaac3 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -78,7 +78,8 @@ User IP address: {{ paper.user_ip }}
{% endif %}
{% endfor %}
- {% elif question.type == "integer" or "string" or "float" %}
+ {% elif question.type == "integer" or question.type == "string"
+ or question.type == "float" %}
<h5> <u>Correct Answer:</u></h5>
{% for testcase in question.get_test_cases %}
<strong>{{ testcase.correct|safe }}</strong>
@@ -96,15 +97,14 @@ User IP address: {{ paper.user_ip }}
{% if question.type != "code" %}
{% if "Correct answer" in answers.0.error_list %}
<div class="panel panel-success">
+ <div class="panel-heading"><strong>Correct</strong></div>
{% else %}
<div class="panel panel-danger">
+ <div class="panel-heading"><strong> Incorrect</strong></div>
{% endif %}
- <div class="panel-heading">
- Autocheck: {{ answers.0.error_list.0 }}
- </div>
<div class="panel-body">
<h5><u>Student answer:</u></h5>
- {% if question.type == "mcc"%}
+ {% if question.type == "mcc"%}
<div class="well well-sm">
{% for testcases in question.get_test_cases %}
{%if testcases.id|stringformat:"i" in answers.0.answer|safe %}
@@ -124,9 +124,9 @@ User IP address: {{ paper.user_ip }}
<div class="well well-sm">
{{ answers.0.answer|safe }}
</div>
- </div>
- </div>
{% endif %}
+ </div>
+ </div>
{% else %}
<h5>Student answer: </h5>
{% for answer in answers %}
diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html
index 850d789..79987b1 100644
--- a/yaksh/templates/yaksh/view_answerpaper.html
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -79,7 +79,7 @@
<div class="panel panel-danger">
{% endif %}
<div class="panel-heading">
- Autocheck: {{ answers.0.error_list.0 }}
+ <strong>{{ answers.0.error_list.0 }}</strong>
</div>
<div class="panel-body">
{% if question.type == "mcc"%}
@@ -117,12 +117,18 @@
<h5>Student answer: </h5>
{% for answer in answers %}
{% if not answer.skipped %}
- {% if "Correct answer" in answer.error %}
+ {% if answer.answer.correct %}
<div class="panel panel-success">
+ <div class="panel-heading">
+ <strong>Correct Answer</strong>
+ </div>
{% else %}
<div class="panel panel-danger">
+ <div class="panel-heading">
+ <strong>Incorrect Answer</strong>
+ </div>
{% endif %}
- <div class="panel-heading">Error:</div>
+
{% with answer.error_list as err %}
{% for error in err %}
{% if not error.expected_output %}