diff --git a/lang/en/auth_outage.php b/lang/en/auth_outage.php index 470c44e..64257dc 100644 --- a/lang/en/auth_outage.php +++ b/lang/en/auth_outage.php @@ -32,6 +32,8 @@ $string['allowedipsnoconfig'] = 'Your config.php does not have the extra setup t $string['auth_outagedescription'] = 'Auxiliary plugin that warns users about a future outage and prevents them from logging in once the outage starts.'; $string['autostart'] = 'Auto start maintenance mode.'; $string['autostart_help'] = 'If selected, when the outage starts it will automatically turn on Moodle maintenance mode.'; +$string['autostartoff'] = 'Default off'; +$string['autostarton'] = 'Default on'; $string['builtinallowediplist'] = 'Builtin Allowed IP List'; $string['builtinallowediplist_desc'] = 'A second allowed IP list which makes it easier to have some IPs forced in config.php and others editable in the UI'; $string['clicreateexamples'] = "Create an outage starting in 10 seconds\n\n> php create.php -s=10"; @@ -99,6 +101,7 @@ $string['defaultwarningdurationdescription'] = 'Default warning time (in minutes $string['description'] = 'Public Description'; $string['description_help'] = 'A full description of the outage, publicly visible by all users.'; $string['finish'] = 'Finish'; +$string['forceoff'] = 'Force off'; $string['info15secondsbefore'] = '15 seconds before'; $string['infoendofoutage'] = 'end of outage'; $string['infofrom'] = 'From:'; diff --git a/settings.php b/settings.php index 870dba6..c905def 100644 --- a/settings.php +++ b/settings.php @@ -43,11 +43,16 @@ if ($hassiteconfig) { get_string('settingssectiondefaultsdescription', 'auth_outage') . $description )); - $settings->add(new admin_setting_configcheckbox( + $settings->add(new admin_setting_configselect( 'auth_outage/default_autostart', get_string('defaultoutageautostart', 'auth_outage'), get_string('defaultoutageautostartdescription', 'auth_outage'), - $defaults['default_autostart'] + 'off', + [ + '0' => get_string('autostartoff', 'auth_outage'), + '1' => get_string('autostarton', 'auth_outage'), + '2' => get_string('forceoff', 'auth_outage'), + ] )); $settings->add(new admin_setting_configduration( diff --git a/version.php b/version.php index 77c93f1..4a35fd7 100644 --- a/version.php +++ b/version.php @@ -30,6 +30,8 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = "auth_outage"; $plugin->version = 2024081900; // The current plugin version (Date: YYYYMMDDXX). $plugin->release = 2024081900; // Human-readable release information. +$plugin->version = 2024081900; // The current plugin version (Date: YYYYMMDDXX). +$plugin->release = 2024081900; // Human-readable release information. $plugin->requires = 2017111309; // 2017111309 = T13, but this really requires 3.9 and higher. $plugin->maturity = MATURITY_STABLE; // Suitable for PRODUCTION environments! $plugin->supported = [39, 405]; // A range of branch numbers of supported moodle versions.