|
24 | 24 | $ADMIN->add('accounts', new admin_externalpage('editusers', new lang_string('userlist','admin'), "$CFG->wwwroot/$CFG->admin/user.php", array('moodle/user:update', 'moodle/user:delete')));
|
25 | 25 | $ADMIN->add('accounts', new admin_externalpage('userbulk', new lang_string('userbulk','admin'), "$CFG->wwwroot/$CFG->admin/user/user_bulk.php", array('moodle/user:update', 'moodle/user:delete')));
|
26 | 26 | $ADMIN->add('accounts', new admin_externalpage('addnewuser', new lang_string('addnewuser'), "$securewwwroot/user/editadvanced.php?id=-1", 'moodle/user:create'));
|
| 27 | + |
| 28 | + // "User default preferences" settingpage. |
| 29 | + $temp = new admin_settingpage('userdefaultpreferences', new lang_string('userdefaultpreferences', 'admin')); |
| 30 | + if ($ADMIN->fulltree) { |
| 31 | + $choices = array(); |
| 32 | + $choices['0'] = new lang_string('emaildisplayno'); |
| 33 | + $choices['1'] = new lang_string('emaildisplayyes'); |
| 34 | + $choices['2'] = new lang_string('emaildisplaycourse'); |
| 35 | + $temp->add(new admin_setting_configselect('defaultpreference_maildisplay', new lang_string('emaildisplay'), |
| 36 | + '', 2, $choices)); |
| 37 | + |
| 38 | + $choices = array(); |
| 39 | + $choices['0'] = new lang_string('textformat'); |
| 40 | + $choices['1'] = new lang_string('htmlformat'); |
| 41 | + $temp->add(new admin_setting_configselect('defaultpreference_mailformat', new lang_string('emailformat'), '', 1, $choices)); |
| 42 | + |
| 43 | + $choices = array(); |
| 44 | + $choices['0'] = new lang_string('emaildigestoff'); |
| 45 | + $choices['1'] = new lang_string('emaildigestcomplete'); |
| 46 | + $choices['2'] = new lang_string('emaildigestsubjects'); |
| 47 | + $temp->add(new admin_setting_configselect('defaultpreference_maildigest', new lang_string('emaildigest'), |
| 48 | + new lang_string('emaildigest_help'), 0, $choices)); |
| 49 | + |
| 50 | + |
| 51 | + $choices = array(); |
| 52 | + $choices['1'] = new lang_string('autosubscribeyes'); |
| 53 | + $choices['0'] = new lang_string('autosubscribeno'); |
| 54 | + $temp->add(new admin_setting_configselect('defaultpreference_autosubscribe', new lang_string('autosubscribe'), |
| 55 | + '', 1, $choices)); |
| 56 | + |
| 57 | + if (!empty($CFG->forum_trackreadposts)) { |
| 58 | + $choices = array(); |
| 59 | + $choices['0'] = new lang_string('trackforumsno'); |
| 60 | + $choices['1'] = new lang_string('trackforumsyes'); |
| 61 | + $temp->add(new admin_setting_configselect('defaultpreference_trackforums', new lang_string('trackforums'), |
| 62 | + '', 0, $choices)); |
| 63 | + } |
| 64 | + } |
| 65 | + $ADMIN->add('accounts', $temp); |
| 66 | + |
27 | 67 | $ADMIN->add('accounts', new admin_externalpage('profilefields', new lang_string('profilefields','admin'), "$CFG->wwwroot/user/profile/index.php", 'moodle/site:config'));
|
28 | 68 | $ADMIN->add('accounts', new admin_externalpage('cohorts', new lang_string('cohorts', 'cohort'), $CFG->wwwroot . '/cohort/index.php', array('moodle/cohort:manage', 'moodle/cohort:view')));
|
29 | 69 |
|
|
0 commit comments