summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authoradityacp2020-08-28 10:52:51 +0530
committeradityacp2020-08-28 10:52:51 +0530
commit620df8d25a82ceb99eb7cd17535c20998e212191 (patch)
tree8202f64768c4589afba97094c6ccf966750d310d /yaksh/templates
parentebe75b31c225eaa71d6963b8ac493e37a63efb50 (diff)
parent574e92a8586d4fc900be2c0d8f5114c93e826358 (diff)
downloadonline_test-620df8d25a82ceb99eb7cd17535c20998e212191.tar.gz
online_test-620df8d25a82ceb99eb7cd17535c20998e212191.tar.bz2
online_test-620df8d25a82ceb99eb7cd17535c20998e212191.zip
Merge branch 'master' of https://github.com/FOSSEE/online_test into multiple_fixes
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/design_questionpaper.html72
1 files changed, 39 insertions, 33 deletions
diff --git a/yaksh/templates/yaksh/design_questionpaper.html b/yaksh/templates/yaksh/design_questionpaper.html
index ffbdf5f..fcc3ed5 100644
--- a/yaksh/templates/yaksh/design_questionpaper.html
+++ b/yaksh/templates/yaksh/design_questionpaper.html
@@ -114,12 +114,47 @@
<div id="fixed-available-wrapper">
<p><u>Select questions to add:</u></p>
<div id="fixed-available">
- {% if state == "fixed" or state == "None" %}
+ {% if questions %}
+ {% if state == "fixed" or state == "None" %}
+ <ul class="inputs-list">
+ <h5><input id="add_checkall" name="add_checkall" type="checkbox"> Select All </h5>
+ {% for question in questions %}
+ <li>
+ <label>
+ <input type="checkbox" name="questions" data-qid="{{question.id}}" value={{question.id}}>
+ <span>
+ {% if user == question.user %}
+ <a href="{% url 'yaksh:add_question' question.id %}" target="_blank">{{ question.summary }}</a>
+ {% else %}
+ {{question.summary}}
+ {% endif %}
+ </span>
+ <span> {{ question.points }}</span>
+ </label>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ {% endif %}
+ </div>
+ </div>
+ <br />
+ <button id="add-fixed" name="add-fixed" class="btn btn-success pull-right" type="submit">
+ <i class="fa fa-plus-square"></i>&nbsp;Add to paper
+ </button>
+ </div>
+ <div class="col-md-6">
+ <div id="fixed-added-wrapper">
+ <p><u>Fixed questions currently in paper:</u></p>
+ <div id="fixed-added">
+ {% if fixed_questions %}
<ul class="inputs-list">
- {% for question in questions %}
+ <h5><input id="remove_checkall" type="checkbox"> Select All </h5>
+ {% for question in fixed_questions %}
<li>
<label>
- <input type="checkbox" name="questions" data-qid="{{question.id}}" value={{question.id}}>
+ <input type="checkbox" name="added-questions"
+ data-qid="{{question.id}}" value={{question.id}}>
<span>
{% if user == question.user %}
<a href="{% url 'yaksh:add_question' question.id %}" target="_blank">{{ question.summary }}</a>
@@ -127,7 +162,7 @@
{{question.summary}}
{% endif %}
</span>
- <span> {{ question.points }}</span>
+ <span> {{ question.points }} </span>
</label>
</li>
{% endfor %}
@@ -136,35 +171,6 @@
</div>
</div>
<br />
- <button id="add-fixed" name="add-fixed" class="btn btn-success pull-right" type="submit">
- <i class="fa fa-plus-square"></i>&nbsp;Add to paper
- </button>
- </div>
- <div class="col-md-6">
- <div id="fixed-added-wrapper">
- <p><u>Fixed questions currently in paper:</u></p>
- <div id="fixed-added">
- <ul class="inputs-list">
- {% for question in fixed_questions %}
- <li>
- <label>
- <input type="checkbox" name="added-questions"
- data-qid="{{question.id}}" value={{question.id}}>
- <span>
- {% if user == question.user %}
- <a href="{% url 'yaksh:add_question' question.id %}" target="_blank">{{ question.summary }}</a>
- {% else %}
- {{question.summary}}
- {% endif %}
- </span>
- <span> {{ question.points }} </span>
- </label>
- </li>
- {% endfor %}
- </ul>
- </div>
- </div>
- <br />
<button id="remove-fixed" name="remove-fixed" class="btn btn-danger pull-right" type="submit">
<i class="fa fa-minus-square"></i>&nbsp;Remove from paper
</button>