summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authoradityacp2016-05-05 12:52:47 +0530
committeradityacp2016-05-05 12:52:47 +0530
commita2d3d14e03c7f6a873b4f838752878d2bcab44aa (patch)
tree61e0e7fe69010f59bc85bdf091a6c1c8ad127fe7 /yaksh/templates
parent2f7891874aec1dec962d55e3b2aaed1c61d7acaa (diff)
downloadonline_test-a2d3d14e03c7f6a873b4f838752878d2bcab44aa.tar.gz
online_test-a2d3d14e03c7f6a873b4f838752878d2bcab44aa.tar.bz2
online_test-a2d3d14e03c7f6a873b4f838752878d2bcab44aa.zip
changes for download questions
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/ajax_question_filter.html3
-rw-r--r--yaksh/templates/yaksh/showquestions.html14
2 files changed, 10 insertions, 7 deletions
diff --git a/yaksh/templates/yaksh/ajax_question_filter.html b/yaksh/templates/yaksh/ajax_question_filter.html
index 11bf660..a63354c 100644
--- a/yaksh/templates/yaksh/ajax_question_filter.html
+++ b/yaksh/templates/yaksh/ajax_question_filter.html
@@ -7,7 +7,8 @@
{% 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>
+ <input type="checkbox" name="question" data-qid="{{question.id}}" value=
+ "{{question.id}}">&nbsp;&nbsp;<a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{ question }}</a><br>
</label>
</li>
{% endfor %}
diff --git a/yaksh/templates/yaksh/showquestions.html b/yaksh/templates/yaksh/showquestions.html
index 6e2253a..ea42797 100644
--- a/yaksh/templates/yaksh/showquestions.html
+++ b/yaksh/templates/yaksh/showquestions.html
@@ -11,12 +11,8 @@
{% block manage %}
-{% if questions %}
-<a href="{{URL_ROOT}}/exam/manage/download_questions/">Download Questions</a><br>
-{% endif %}
-
<h4>Upload json file for adding questions</h4>
-<form action="{{URL_ROOT}}/exam/manage/upload_questions/" method="post" enctype="multipart/form-data">
+<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ upload_form.as_p }}
<button class="btn" type="submit" name="upload" value="upload">Upload File</button>
@@ -24,6 +20,9 @@
{% if message %}
<h4>{{ message }}</h4>
{% endif %}
+{% if msg %}
+<h4>{{ msg }}</h4>
+{% endif %}
<form name=frm action="" method="post">
{% csrf_token %}
<div class="row" id="selectors">
@@ -56,6 +55,9 @@
</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" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button>
+<button class="btn" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button>&nbsp;&nbsp;
+{% if questions %}
+<button class="btn" type="submit" name='download' value='download'>Download Selected</button>
+{% endif %}
</form>
{% endblock %}