diff options
Diffstat (limited to 'testapp/exam/templates')
-rw-r--r-- | testapp/exam/templates/exam/ajax_question_filter.html | 15 | ||||
-rw-r--r-- | testapp/exam/templates/exam/showquestions.html | 23 |
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}}"> <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 }}"> <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> <button class="btn" type="submit" name='edit' value='edit' onClick="return confirm_edit(frm);">Edit Selected</button> |