Пример #1
0
$name = 'theme_mmcmonkwearmouth/teacher_buttons';
$title = get_string('teacherbuttons', 'theme_mmcmonkwearmouth');
$description = get_string('settingbuttonsdesc', 'theme_mmcmonkwearmouth');
$setting = new theme_mmcmonkwearmouth_admin_setting_buttons($name, $title, $description, 0);
$setting->set_updatedcallback('theme_reset_all_caches');
$settings->add($setting);
$name = 'theme_mmcmonkwearmouth/student_buttons';
$title = get_string('studentbuttons', 'theme_mmcmonkwearmouth');
$description = get_string('settingbuttonsdesc', 'theme_mmcmonkwearmouth');
$setting = new theme_mmcmonkwearmouth_admin_setting_buttons($name, $title, $description, 0);
$setting->set_updatedcallback('theme_reset_all_caches');
$settings->add($setting);
$name = 'theme_mmcmonkwearmouth/staff_buttons';
$title = get_string('staffbuttons', 'theme_mmcmonkwearmouth');
$description = get_string('settingbuttonsdesc', 'theme_mmcmonkwearmouth');
$setting = new theme_mmcmonkwearmouth_admin_setting_buttons($name, $title, $description, 0);
$setting->set_updatedcallback('theme_reset_all_caches');
$settings->add($setting);
$name = 'theme_mmcmonkwearmouth/logo';
$title = get_string('logo', 'theme_mmcmonkwearmouth');
$description = get_string('logodesc', 'theme_mmcmonkwearmouth');
$setting = new admin_setting_configstoredfile($name, $title, $description, 'logo');
$setting->set_updatedcallback('theme_reset_all_caches');
$settings->add($setting);
$name = 'theme_mmcmonkwearmouth/customcss';
$title = get_string('customcss', 'theme_mmcmonkwearmouth');
$description = get_string('customcssdesc', 'theme_mmcmonkwearmouth');
$default = '';
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
$setting->set_updatedcallback('theme_reset_all_caches');
$settings->add($setting);
Пример #2
0
$configdesc = get_string('cfg_redirecturi_desc', 'auth_oidc');
$settings->add(new \auth_oidc\form\adminsetting\redirecturi('auth_oidc/redirecturi', $configkey, $configdesc));
$configkey = get_string('cfg_autoappend_key', 'auth_oidc');
$configdesc = get_string('cfg_autoappend_desc', 'auth_oidc');
$configdefault = '';
$settings->add(new admin_setting_configtext('auth_oidc/autoappend', $configkey, $configdesc, $configdefault, PARAM_TEXT));
$configkey = get_string('cfg_domainhint_key', 'auth_oidc');
$configdesc = get_string('cfg_domainhint_desc', 'auth_oidc');
$configdefault = '';
$settings->add(new admin_setting_configtext('auth_oidc/domainhint', $configkey, $configdesc, $configdefault, PARAM_TEXT));
$configkey = get_string('cfg_loginflow_key', 'auth_oidc');
$configdesc = '';
$configdefault = 'authcode';
$settings->add(new \auth_oidc\form\adminsetting\loginflow('auth_oidc/loginflow', $configkey, $configdesc, $configdefault));
$configkey = get_string('cfg_userrestrictions_key', 'auth_oidc');
$configdesc = get_string('cfg_userrestrictions_desc', 'auth_oidc');
$configdefault = '';
$settings->add(new admin_setting_configtextarea('auth_oidc/userrestrictions', $configkey, $configdesc, $configdefault, PARAM_TEXT));
$label = get_string('cfg_debugmode_key', 'auth_oidc');
$desc = get_string('cfg_debugmode_desc', 'auth_oidc');
$settings->add(new \admin_setting_configcheckbox('auth_oidc/debugmode', $label, $desc, '0'));
$configkey = get_string('cfg_icon_key', 'auth_oidc');
$configdesc = get_string('cfg_icon_desc', 'auth_oidc');
$configdefault = 'auth_oidc:o365';
$icons = [['pix' => 'o365', 'alt' => get_string('cfg_iconalt_o365', 'auth_oidc'), 'component' => 'auth_oidc'], ['pix' => 't/locked', 'alt' => get_string('cfg_iconalt_locked', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 't/lock', 'alt' => get_string('cfg_iconalt_lock', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 't/go', 'alt' => get_string('cfg_iconalt_go', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 't/stop', 'alt' => get_string('cfg_iconalt_stop', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 't/user', 'alt' => get_string('cfg_iconalt_user', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 'u/user35', 'alt' => get_string('cfg_iconalt_user2', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 'i/permissions', 'alt' => get_string('cfg_iconalt_key', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 'i/cohort', 'alt' => get_string('cfg_iconalt_group', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 'i/groups', 'alt' => get_string('cfg_iconalt_group2', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 'i/mnethost', 'alt' => get_string('cfg_iconalt_mnet', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 'i/permissionlock', 'alt' => get_string('cfg_iconalt_userlock', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 't/more', 'alt' => get_string('cfg_iconalt_plus', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 't/approve', 'alt' => get_string('cfg_iconalt_check', 'auth_oidc'), 'component' => 'moodle'], ['pix' => 't/right', 'alt' => get_string('cfg_iconalt_rightarrow', 'auth_oidc'), 'component' => 'moodle']];
$settings->add(new \auth_oidc\form\adminsetting\iconselect('auth_oidc/icon', $configkey, $configdesc, $configdefault, $icons));
$configkey = get_string('cfg_customicon_key', 'auth_oidc');
$configdesc = get_string('cfg_customicon_desc', 'auth_oidc');
$setting = new admin_setting_configstoredfile('auth_oidc/customicon', $configkey, $configdesc, 'customicon');
$setting->set_updatedcallback('auth_oidc_initialize_customicon');
$settings->add($setting);
 public function add_files($setting, $instance)
 {
     $file = new admin_setting_configstoredfile($this->name_for($setting . $instance), $this->title_for($setting, $instance), $this->description_for($setting), $setting . $instance);
     $file->set_updatedcallback('theme_reset_all_caches');
     return $file;
 }
 public function add_file($setting)
 {
     $file = new admin_setting_configstoredfile($this->name_for($setting), $this->title_for($setting), $this->description_for($setting), $setting);
     $file->set_updatedcallback('theme_reset_all_caches');
     $this->settingspage->add($file);
 }
Пример #5
0
 $settings->add($setting);
 // Favicon file setting.
 $name = 'theme_snap/favicon';
 $title = new lang_string('favicon', 'theme_snap');
 $description = new lang_string('favicondesc', 'theme_snap');
 $opts = array('accepted_types' => array('.ico'));
 $setting = new admin_setting_configstoredfile($name, $title, $description, 'favicon', 0, $opts);
 $setting->set_updatedcallback('theme_reset_all_caches');
 $settings->add($setting);
 // Cover image file setting.
 $name = 'theme_snap/poster';
 $title = new lang_string('poster', 'theme_snap');
 $description = new lang_string('posterdesc', 'theme_snap');
 $opts = array('accepted_types' => array('.png', '.jpg', '.gif', '.webp', '.tiff', '.svg'));
 $setting = new admin_setting_configstoredfile($name, $title, $description, 'poster', 0, $opts);
 $setting->set_updatedcallback('theme_snap_process_site_coverimage');
 $settings->add($setting);
 $name = 'theme_snap/menusandnavheading';
 $title = new lang_string('menusandnavheading', 'theme_snap');
 $description = new lang_string('menusandnavheadingdesc', 'theme_snap');
 $setting = new admin_setting_heading($name, $title, $description);
 $settings->add($setting);
 // Hide navigation block.
 $name = 'theme_snap/hidenavblock';
 $title = new lang_string('hidenavblock', 'theme_snap');
 $description = new lang_string('hidenavblockdesc', 'theme_snap');
 $checked = '1';
 $unchecked = '0';
 $default = $checked;
 $setting = new admin_setting_configcheckbox($name, $title, $description, $default, $checked, $unchecked);
 $settings->add($setting);