Browse Source

Add ability to set default value for subnet restriction.

MOODLE_33_STABLE
Dan Marsden 8 years ago
parent
commit
596644ef32
  1. 2
      lang/en/attendance.php
  2. 7
      settings.php

2
lang/en/attendance.php

@ -363,3 +363,5 @@ $string['extrarestrictions'] = 'Extra restrictions';
$string['requiresubnet'] = 'Students can only record own attendance from these computers.'; $string['requiresubnet'] = 'Students can only record own attendance from these computers.';
$string['subnetwrong'] = 'Attendance can only be recorded from certain locations, and this computer is not on the allowed list.'; $string['subnetwrong'] = 'Attendance can only be recorded from certain locations, and this computer is not on the allowed list.';
$string['requiresubnet_help'] = 'Attendance recording may be restricted to particular subnets by specifying a comma-separated list of partial or full IP addresses.'; $string['requiresubnet_help'] = 'Attendance recording may be restricted to particular subnets by specifying a comma-separated list of partial or full IP addresses.';
$string['defaultsettings'] = 'Default attendance settings';
$string['defaultsettings_help'] = 'These settings define the defaults for all new attendances';

7
settings.php

@ -44,4 +44,11 @@ if ($ADMIN->fulltree) {
$settings->add(new admin_setting_configcheckbox('attendance/studentscanmark', $settings->add(new admin_setting_configcheckbox('attendance/studentscanmark',
get_string('studentscanmark', 'attendance'), get_string('studentscanmark_desc', 'attendance'), 1)); get_string('studentscanmark', 'attendance'), get_string('studentscanmark_desc', 'attendance'), 1));
$name = new lang_string('defaultsettings', 'mod_attendance');
$description = new lang_string('defaultsettings_help', 'mod_attendance');
$settings->add(new admin_setting_heading('defaultsettings', $name, $description));
$settings->add(new admin_setting_configtext('attendance/subnet',
get_string('requiresubnet', 'attendance'), get_string('requiresubnet_help', 'attendance'), '', PARAM_RAW));
} }

Loading…
Cancel
Save