diff options
author | King | 2016-05-05 18:46:19 +0530 |
---|---|---|
committer | King | 2016-05-05 18:46:19 +0530 |
commit | d386d24aaa662f91e4314060926dc9bc02426c7d (patch) | |
tree | 28e8b0d3e39cf5d9a6ce77b42b712290f1a3baf3 /yaksh/templates | |
parent | 8841e5ed4f8f79b7067ddb3523f4a3ec50f362b3 (diff) | |
parent | e81b13f7d94c0877801726fc85e967f36ba8bd90 (diff) | |
download | online_test-d386d24aaa662f91e4314060926dc9bc02426c7d.tar.gz online_test-d386d24aaa662f91e4314060926dc9bc02426c7d.tar.bz2 online_test-d386d24aaa662f91e4314060926dc9bc02426c7d.zip |
Merge pull request #93 from adityacp/load_dump_questions
Load dump questions
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/ajax_question_filter.html | 3 | ||||
-rw-r--r-- | yaksh/templates/yaksh/showquestions.html | 22 |
2 files changed, 23 insertions, 2 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}}"> <a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{ question }}</a><br> + <input type="checkbox" name="question" data-qid="{{question.id}}" value= + "{{question.id}}"> <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 ca51d1a..ea42797 100644 --- a/yaksh/templates/yaksh/showquestions.html +++ b/yaksh/templates/yaksh/showquestions.html @@ -10,6 +10,19 @@ {% endblock %} {% block manage %} + +<h4>Upload json file for adding questions</h4> +<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> +</form> +{% 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"> @@ -31,13 +44,20 @@ </div> </div> <br> + <div id="filtered-questions"> +{% if questions %} +<h5 class="highlight"><input id="checkall" class="ignore" type="checkbox"> Select All </h5> {% 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 %} +{% endif %} </div> <br> <button class="btn" type="button" onclick='location.replace("{{URL_ROOT}}/exam/manage/addquestion/");'>Add Question</button> -<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> +{% if questions %} +<button class="btn" type="submit" name='download' value='download'>Download Selected</button> +{% endif %} </form> {% endblock %} |