From 5e7d7190a20ac3eb83ad5dd5e58fa216533eabad Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Sat, 28 Jan 2017 01:20:11 +0530 Subject: added select all to remove all trial papers --- yaksh/static/yaksh/js/moderator_dashboard.js | 14 ++++++++++++++ yaksh/templates/yaksh/moderator_dashboard.html | 13 +++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 yaksh/static/yaksh/js/moderator_dashboard.js diff --git a/yaksh/static/yaksh/js/moderator_dashboard.js b/yaksh/static/yaksh/js/moderator_dashboard.js new file mode 100644 index 0000000..87d039c --- /dev/null +++ b/yaksh/static/yaksh/js/moderator_dashboard.js @@ -0,0 +1,14 @@ +$(document).ready(function(){ +$(".selectall").change(function(){ + if($(this).prop("checked")) { + $("#trial input:checkbox").each(function(index, element) { + $(this).prop('checked', true); + }); + } + else { + $("#trial input:checkbox").each(function(index, element) { + $(this).prop('checked', false); + }); + } + }); +}); \ No newline at end of file diff --git a/yaksh/templates/yaksh/moderator_dashboard.html b/yaksh/templates/yaksh/moderator_dashboard.html index aeeb772..64167f8 100644 --- a/yaksh/templates/yaksh/moderator_dashboard.html +++ b/yaksh/templates/yaksh/moderator_dashboard.html @@ -1,6 +1,10 @@ {% extends "manage.html" %} {% block pagetitle %} Moderator's Dashboard {% endblock pagetitle %} +{% block script %} + +{% endblock %} + {% block content %}

List of quizzes! Click on the given links to have a look at answer papers for a quiz.

@@ -49,18 +53,23 @@ {% endif %} {% if trial_paper %} -
You have trial papers. +
+

You have trial papers

+     Select all +
+
{% csrf_token %} {% for paper in trial_paper %} - + {% endfor %}
{{paper.question_paper.quiz.description}}
+
{% endif %} {% endblock %} -- cgit