forked from meyersh/moodle-block_quickmail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.php
18 lines (15 loc) · 824 Bytes
/
settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
defined('MOODLE_INTERNAL') || die;
if($ADMIN->fulltree) {
$select = array(0 => get_string('no'), 1 => get_string('yes'));
$settings->add(new admin_setting_configselect('block_quickmail_allowstudents',
get_string('allowstudents', 'block_quickmail'), get_string('allowstudents',
'block_quickmail'), 0, $select));
$roles = $DB->get_records_menu('role', null, 'sortorder ASC', 'id, name');
$defaults = array_map(function ($sn) use ($DB) {
return $DB->get_field('role', 'id', array('shortname' => $sn));
}, array('editingteacher', 'teacher', 'student'));
$settings->add(new admin_setting_configmultiselect('block_quickmail_roleselection',
get_string('select_roles', 'block_quickmail'), get_string('select_roles',
'block_quickmail'), $defaults, $roles));
}