mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Building basic structure.
This commit is contained in:
39
settings.php
39
settings.php
@@ -14,9 +14,40 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* auth_outage plugin settings
|
||||
*
|
||||
* @package auth_outage
|
||||
* @author Daniel Thee Roperto <daniel.roperto@catalyst-au.net>
|
||||
* @copyright Catalyst IT
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
if ($ADMIN->fulltree) {
|
||||
$settings->add(new admin_setting_configselect('data_auth_outage', get_string('enablerssfeeds', 'admin'),
|
||||
$str, 0, $options));
|
||||
}
|
||||
if ($hassiteconfig) {
|
||||
// Configure default settings page.
|
||||
$settings->visiblename = "Defaults";
|
||||
$settings->add(
|
||||
new admin_setting_configtext('auth_outage_warning_period',
|
||||
"Default Warning Time",
|
||||
"Default warning time (in minutes) for outages.",
|
||||
120, PARAM_INT));
|
||||
$settings->add(
|
||||
new admin_setting_configtextarea('auth_outage_warning_text',
|
||||
'Default Warning Message',
|
||||
'Default warning message for outages. Use [from] and [until] placeholders as required.',
|
||||
'There is an scheduled maintenance from [from] to [until] and our system will not be available during that time.',
|
||||
PARAM_TEXT)
|
||||
);
|
||||
// Create category for Outage.
|
||||
$ADMIN->add('authsettings', new admin_category('auth_outage', 'Outage'));
|
||||
// Add settings page toconfigure defaults.
|
||||
$ADMIN->add('auth_outage', $settings);
|
||||
// Clear '$settings' to prevent adding again outsite category.
|
||||
$settings = null;
|
||||
// Add list page.
|
||||
$ADMIN->add('auth_outage',
|
||||
new admin_externalpage('auth_outage_list', 'Outage List',
|
||||
new moodle_url($CFG->wwwroot . '/auth/outage/list.php')
|
||||
));
|
||||
}
|
||||
Reference in New Issue
Block a user