summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorPrabhu Ramachandran2017-11-07 19:28:42 +0530
committerGitHub2017-11-07 19:28:42 +0530
commite65b605e59c1384ad9607c99484107929248f220 (patch)
tree798dc730344fa6ea16f1c81b981c218ea5e6abd9 /yaksh/templates
parenta89ddbacb3b3cf48168281cb41ea61b127c9410c (diff)
parent2eee8fa300a4776647a7be7fdb9dee082f4d6fd8 (diff)
downloadonline_test-e65b605e59c1384ad9607c99484107929248f220.tar.gz
online_test-e65b605e59c1384ad9607c99484107929248f220.tar.bz2
online_test-e65b605e59c1384ad9607c99484107929248f220.zip
Merge pull request #373 from prathamesh920/detailed_csv_download_quiz
Detailed csv download quiz
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/monitor.html47
1 files changed, 46 insertions, 1 deletions
diff --git a/yaksh/templates/yaksh/monitor.html b/yaksh/templates/yaksh/monitor.html
index 9ce0dc4..8df2e7d 100644
--- a/yaksh/templates/yaksh/monitor.html
+++ b/yaksh/templates/yaksh/monitor.html
@@ -76,7 +76,10 @@ $(document).ready(function()
<p>Papers in progress:<b> {{ inprogress_papers }} </b></p>
<p><a href="{{URL_ROOT}}/exam/manage/statistics/question/{{papers.0.question_paper.id}}">Question Statisitics</a></p>
-<p><a href="{{URL_ROOT}}/exam/manage/monitor/download_csv/{{papers.0.question_paper.id}}">Download CSV</a></p>
+<p>
+ <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#csvModal">
+ Download CSV <span class="glyphicon glyphicon-save"></span>
+ </button></p>
<table id="result-table" class="tablesorter table table table-striped">
<thead>
<tr>
@@ -115,4 +118,46 @@ $(document).ready(function()
<h4>No Quiz Found</h4>
{% endif %}
{% endif %}
+
+<!-- CSV Modal -->
+<div class="modal fade" id="csvModal" role="dialog">
+ <div class="modal-dialog">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">&times;</button>
+ <h3 class="modal-title">Uncheck unwanted columns</h3>
+ </div>
+ <form action="{{URL_ROOT}}/exam/manage/download_quiz_csv/{{ quiz.course.id }}/{{ quiz.id }}/" method="post">
+ {% csrf_token %}
+ <div class="modal-body">
+ {% for field in csv_fields %}
+ <div class="form-check form-check-inline">
+ <label class="form-check-label">
+ <input class="form-check-input" name="csv_fields" type="checkbox" value="{{ field }}" checked> {{ field }}
+ </label>
+ </div>
+ {% endfor %}
+ <b>Select Attempt Number: Default latest attempt</b>
+ <select class="form-control" name = "attempt_number">
+ {%for attempt_number in attempt_numbers %}
+ {% if forloop.last %}
+ <option value="{{ attempt_number }}" selected>{{ attempt_number }} (Latest)</option>
+ {% else %}
+ <option value = "{{ attempt_number }}"> {{ attempt_number }}</option>
+ {% endif %}
+ {% endfor %}
+ </select>
+ </div>
+ <div class="modal-footer">
+ <button type="submit" class="btn btn-primary"> Download <span class="glyphicon glyphicon-save"></span></button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+
+
{% endblock %}