summaryrefslogtreecommitdiff
path: root/testapp/exam/templates
diff options
context:
space:
mode:
authorPrabhu Ramachandran2015-09-01 13:03:56 +0530
committerPrabhu Ramachandran2015-09-01 13:03:56 +0530
commitc9abbadbb0e6a4a60edb7ef2a14d6c74648b0677 (patch)
tree8a140c6e2869885b5f53ac8204a8b6ed4a2436a2 /testapp/exam/templates
parent44cb800dec3fb81fa084ef59ebe4b54f0b389bc1 (diff)
parentdbab99bc13b8483c24706e47a9a0926508e3c332 (diff)
downloadonline_test-c9abbadbb0e6a4a60edb7ef2a14d6c74648b0677.tar.gz
online_test-c9abbadbb0e6a4a60edb7ef2a14d6c74648b0677.tar.bz2
online_test-c9abbadbb0e6a4a60edb7ef2a14d6c74648b0677.zip
Merge pull request #54 from ankitjavalkar/filter-sort
Filter fields for questions
Diffstat (limited to 'testapp/exam/templates')
-rw-r--r--testapp/exam/templates/exam/ajax_question_filter.html15
-rw-r--r--testapp/exam/templates/exam/showquestions.html23
2 files changed, 38 insertions, 0 deletions
diff --git a/testapp/exam/templates/exam/ajax_question_filter.html b/testapp/exam/templates/exam/ajax_question_filter.html
new file mode 100644
index 0000000..11bf660
--- /dev/null
+++ b/testapp/exam/templates/exam/ajax_question_filter.html
@@ -0,0 +1,15 @@
+<div id="questions">
+ {% if questions %}
+ <h5 class="highlight"><input type="checkbox" id="checkall" class="ignore"> Select All </h5>
+ {% endif %}
+ <ul class="inputs-list">
+
+ {% for question in questions %}
+ <li>
+ <label>
+ <input type="checkbox" name="question" data-qid="{{question.id}}">&nbsp;&nbsp;<a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{ question }}</a><br>
+ </label>
+ </li>
+ {% endfor %}
+ </ul>
+</div>
diff --git a/testapp/exam/templates/exam/showquestions.html b/testapp/exam/templates/exam/showquestions.html
index 62b40e4..d593ab8 100644
--- a/testapp/exam/templates/exam/showquestions.html
+++ b/testapp/exam/templates/exam/showquestions.html
@@ -4,15 +4,38 @@
{% block subtitle %}List of Questions {% endblock %}
{% block script %}
+<script src="{{ URL_ROOT }}/static/exam/js/min.js"></script>
<script src="{{ URL_ROOT }}/static/exam/js/show_question.js"></script>
+<script src="{{ URL_ROOT }}/static/exam/js/question_filter.js"></script>
{% endblock %}
{% block manage %}
<form name=frm action="" method="post">
{% csrf_token %}
+<div class="row" id="selectors">
+ <h5 style="padding-left: 20px;">Filters</h5>
+ <div class="span4">
+ {{ form.question_type }}
+ </div>
+ <div class="span4">
+ {{ form.language }}
+ </div>
+ <div class="span4">
+ {{ form.marks }}
+ </div>
+</div>
+<br>
+<div class="row">
+<div class="span16">
+ <button class="btn" type="button" onClick='location.replace("{{URL_ROOT}}");'>Clear Filters</button>
+</div>
+</div>
+<br>
+<div id="filtered-questions">
{% for i in questions %}
<input type="checkbox" name="question" value="{{ i.id }}">&nbsp;&nbsp;<a href="{{URL_ROOT}}/exam/manage/addquestion/{{ i.id }}">{{ i }}</a><br>
{% endfor %}
+</div>
<br>
<button class="btn" type="button" onclick='location.replace("{{URL_ROOT}}/exam/manage/addquestion/");'>Add Question</button>&nbsp;&nbsp;
<button class="btn" type="submit" name='edit' value='edit' onClick="return confirm_edit(frm);">Edit Selected</button>&nbsp;&nbsp;