summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaheshgudi2018-01-08 17:29:23 +0530
committermaheshgudi2018-01-08 17:30:25 +0530
commitf0fafed7ba0002369f528a901d9e5590f5bd3bea (patch)
tree6c2e8177e466593a63d3911c22526a32ac95fe7f
parentcc956355f8ddb13e9430f6e41ab183eebc848530 (diff)
downloadonline_test-f0fafed7ba0002369f528a901d9e5590f5bd3bea.tar.gz
online_test-f0fafed7ba0002369f528a901d9e5590f5bd3bea.tar.bz2
online_test-f0fafed7ba0002369f528a901d9e5590f5bd3bea.zip
Separate solution div from question description div
-rw-r--r--yaksh/static/yaksh/js/requesthandler.js4
-rw-r--r--yaksh/templates/yaksh/question.html38
2 files changed, 21 insertions, 21 deletions
diff --git a/yaksh/static/yaksh/js/requesthandler.js b/yaksh/static/yaksh/js/requesthandler.js
index e6048b2..ec2391a 100644
--- a/yaksh/static/yaksh/js/requesthandler.js
+++ b/yaksh/static/yaksh/js/requesthandler.js
@@ -37,7 +37,9 @@ function unlock_screen() {
}
function show_solution() {
- document.getElementById("solution").style.display = "block";
+ var solution = document.getElementById("solution");
+ solution.style.display = "block";
+ solution.className ="well well-sm";
document.getElementById("skip_ex").style.visibility = "visible";
}
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index b7251ad..c7e6efb 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -144,21 +144,6 @@ question_type = "{{ question.type }}"
{% endblock %}
{% block main %}
- <p id="status"></p>
- {% if notification %}
- {% if question.type == "code" %}
- <div id="notification" class="alert alert-success" role="alert">
- <strong>Note:</strong> {{ notification }}
- </div>
- {% else %}
- <div id="notification" class="alert alert-warning" role="alert">
- <strong>Note:</strong> {{ notification }}
- </div>
- {% endif %}
- {% else %}
- <div id="notification" role="alert">
- </div>
- {% endif %}
<form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.attempt_number }}/{{ module.id }}/{{ paper.question_paper.id }}/{{course.id}}/" method="post" enctype="multipart/form-data">
{% csrf_token %}
<input type=hidden name="question_id" id="question_id" value={{ question.id }}></input>
@@ -197,22 +182,20 @@ question_type = "{{ question.type }}"
<h5><a href="{{f_name.file.url}}">{{f_name.file.name}}</a></h5>
{% endfor %}
{% endif %}
-
+ </div>
+ <br/>
{% if quiz.is_exercise %}
{% if can_skip %}
- <div id="solution">
+ <div class = "well well-sm" id="solution">
{% else %}
<div id="solution" style="display:none">
{% endif %}
{% if question.solution %}
<h4><u> Solution by teacher</u></h4>
- {% else %}
- <h4><u> No solution provided by teacher </u></h4>
{% endif%}
<font size=3 face=arial> {{ question.solution|safe }} </font>
</div>
{% endif %}
- </div>
<div class="panel-body">
{% if question.type == "mcq" %}
{% for test_case in test_cases %}
@@ -304,6 +287,21 @@ question_type = "{{ question.type }}"
</div>
</div>
<br/>
+ <p id="status"></p>
+ {% if notification %}
+ {% if question.type == "code" %}
+ <div id="notification" class="alert alert-success" role="alert">
+ <strong>Note:</strong> {{ notification }}
+ </div>
+ {% else %}
+ <div id="notification" class="alert alert-warning" role="alert">
+ <strong>Note:</strong> {{ notification }}
+ </div>
+ {% endif %}
+ {% else %}
+ <div id="notification" role="alert">
+ </div>
+ {% endif %}
{% if question.type == 'code' or question.type == 'upload' %}
<div class="row" id="error_panel"></div>
{% endif %}