Browse Source

Fix #405 New feature to allow better control of "set all" status values.

allows the ability to only set unselected items.
nwp90-nwp90-allsessionsreport
Nick Phillips 6 years ago
committed by Dan Marsden
parent
commit
3dd57337f2
  1. 4
      lang/en/attendance.php
  2. 10
      renderer.php

4
lang/en/attendance.php

@ -440,8 +440,8 @@ $string['sessiontype'] = 'Type';
$string['sessiontypeshort'] = 'Type'; $string['sessiontypeshort'] = 'Type';
$string['sessionupdated'] = 'Session successfully updated'; $string['sessionupdated'] = 'Session successfully updated';
$string['set_by_student'] = 'Self-recorded'; $string['set_by_student'] = 'Self-recorded';
$string['setallstatuses'] = 'Set status for all users'; $string['setallstatuses'] = 'Set status for';
$string['setallstatusesto'] = 'Set status for all users to «{$a}»'; $string['setallstatusesto'] = 'Set status to «{$a}»';
$string['setperiod'] = 'Specified time in minutes to release IP'; $string['setperiod'] = 'Specified time in minutes to release IP';
$string['settings'] = 'Settings'; $string['settings'] = 'Settings';
$string['setunmarked'] = 'Automatically set when not marked'; $string['setunmarked'] = 'Automatically set when not marked';

10
renderer.php

@ -663,7 +663,12 @@ class mod_attendance_renderer extends plugin_renderer_base {
$PAGE->requires->js_amd_inline(" $PAGE->requires->js_amd_inline("
require(['jquery'], function($) { require(['jquery'], function($) {
$('#radiocheckstatus".$st->id."').click(function(e) { $('#radiocheckstatus".$st->id."').click(function(e) {
if (e.shiftKey) {
$('#attendancetakeform').find('.st".$st->id."').prop('checked', true); $('#attendancetakeform').find('.st".$st->id."').prop('checked', true);
}
else {
$('#attendancetakeform').find('input:indeterminate.st".$st->id."').prop('checked', true);
}
}); });
});"); });");
} }
@ -729,7 +734,12 @@ class mod_attendance_renderer extends plugin_renderer_base {
$PAGE->requires->js_amd_inline(" $PAGE->requires->js_amd_inline("
require(['jquery'], function($) { require(['jquery'], function($) {
$('#checkstatus".$st->id."').click(function(e) { $('#checkstatus".$st->id."').click(function(e) {
if (e.shiftKey) {
$('#attendancetakeform').find('input:indeterminate.st".$st->id."').prop('checked', true);
}
else {
$('#attendancetakeform').find('.st".$st->id."').prop('checked', true); $('#attendancetakeform').find('.st".$st->id."').prop('checked', true);
}
e.preventDefault(); e.preventDefault();
}); });
});"); });");

Loading…
Cancel
Save