diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/add_quiz.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/design_questionpaper.html | 72 |
2 files changed, 40 insertions, 34 deletions
diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html index 55e3bd6..01b6f8c 100644 --- a/yaksh/templates/yaksh/add_quiz.html +++ b/yaksh/templates/yaksh/add_quiz.html @@ -55,7 +55,7 @@ {% if quiz and course_id %} {% if quiz.questionpaper_set.get.id %} <center> - <a href="{% url 'yaksh:designquestionpaper' quiz.id quiz.questionpaper_set.get.id course_id %}" class="btn btn-primary"> + <a href="{% url 'yaksh:designquestionpaper' course_id quiz.id quiz.questionpaper_set.get.id %}" class="btn btn-primary"> <i class="fa fa-edit"></i> Edit Question Paper </a> <a href="{% url 'yaksh:preview_questionpaper' quiz.questionpaper_set.get.id %}" class="btn btn-info" target="_blank"> 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> 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> 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> Remove from paper </button> |