Commit dbf9e4ba authored by Petr Skoda's avatar Petr Skoda
Browse files

MDL-23234 finally standardised use of settings.php across all plugins - the...

MDL-23234 finally standardised use of settings.php across all plugins - the only partial exceptions now are report and local plugins
parent bf36ee9b
<?php
require_once($CFG->dirroot . '/mod/scorm/locallib.php');
$yesno = array(0 => get_string('no'),
1 => get_string('yes'));
$settings->add(new admin_setting_configselect('scorm/grademethod', get_string('grademethod', 'scorm'),get_string('grademethoddesc', 'scorm'), GRADEHIGHEST, scorm_get_grade_method_array()));
defined('MOODLE_INTERNAL') || die;
for ($i=0; $i<=100; $i++) {
$grades[$i] = "$i";
}
$settings->add(new admin_setting_configselect('scorm/maxgrade', get_string('maximumgrade'),get_string('maximumgradedesc','scorm'), 100, $grades));
if ($ADMIN->fulltree) {
require_once($CFG->dirroot . '/mod/scorm/locallib.php');
$yesno = array(0 => get_string('no'),
1 => get_string('yes'));
$settings->add(new admin_setting_configtext('scorm/maxattempts', get_string('maximumattempts', 'scorm'), '', 0, PARAM_INT));
$settings->add(new admin_setting_configselect('scorm/grademethod', get_string('grademethod', 'scorm'),get_string('grademethoddesc', 'scorm'), GRADEHIGHEST, scorm_get_grade_method_array()));
$settings->add(new admin_setting_configselect('scorm/displayattemptstatus', get_string('displayattemptstatus', 'scorm'),get_string('displayattemptstatusdesc', 'scorm'),0,$yesno));
for ($i=0; $i<=100; $i++) {
$grades[$i] = "$i";
}
$settings->add(new admin_setting_configselect('scorm/maxgrade', get_string('maximumgrade'),get_string('maximumgradedesc','scorm'), 100, $grades));
$settings->add(new admin_setting_configselect('scorm/displaycoursestructure', get_string('displaycoursestructure', 'scorm'),get_string('displaycoursestructuredesc', 'scorm'),0,$yesno));
$settings->add(new admin_setting_configtext('scorm/maxattempts', get_string('maximumattempts', 'scorm'), '', 0, PARAM_INT));
$settings->add(new admin_setting_configselect('scorm/forcecompleted', get_string('forcecompleted', 'scorm'),get_string('forcecompleteddesc', 'scorm'),0,$yesno));
$settings->add(new admin_setting_configselect('scorm/displayattemptstatus', get_string('displayattemptstatus', 'scorm'),get_string('displayattemptstatusdesc', 'scorm'),0,$yesno));
$settings->add(new admin_setting_configselect('scorm/forcenewattempt', get_string('forcenewattempt', 'scorm'),get_string('forcenewattemptdesc', 'scorm'),0,$yesno));
$settings->add(new admin_setting_configselect('scorm/displaycoursestructure', get_string('displaycoursestructure', 'scorm'),get_string('displaycoursestructuredesc', 'scorm'),0,$yesno));
$settings->add(new admin_setting_configselect('scorm/lastattemptlock', get_string('lastattemptlock', 'scorm'),get_string('lastattemptlockdesc', 'scorm'),0,$yesno));
$settings->add(new admin_setting_configselect('scorm/forcecompleted', get_string('forcecompleted', 'scorm'),get_string('forcecompleteddesc', 'scorm'),0,$yesno));
$settings->add(new admin_setting_configselect('scorm/whatgrade', get_string('whatgrade', 'scorm'), get_string('whatgradedesc', 'scorm'), HIGHESTATTEMPT, scorm_get_what_grade_array()));
$settings->add(new admin_setting_configselect('scorm/forcenewattempt', get_string('forcenewattempt', 'scorm'),get_string('forcenewattemptdesc', 'scorm'),0,$yesno));
$settings->add(new admin_setting_configtext('scorm/framewidth', get_string('width', 'scorm'), get_string('framewidth', 'scorm'), 100));
$settings->add(new admin_setting_configselect('scorm/lastattemptlock', get_string('lastattemptlock', 'scorm'),get_string('lastattemptlockdesc', 'scorm'),0,$yesno));
$settings->add(new admin_setting_configtext('scorm/frameheight', get_string('height', 'scorm'), get_string('frameheight', 'scorm'), 500));
$settings->add(new admin_setting_configselect('scorm/whatgrade', get_string('whatgrade', 'scorm'), get_string('whatgradedesc', 'scorm'), HIGHESTATTEMPT, scorm_get_what_grade_array()));
$settings->add(new admin_setting_configselect('scorm/popup', get_string('display','scorm'), get_string('displaydesc','scorm'), 0, scorm_get_popup_display_array()));
$settings->add(new admin_setting_configtext('scorm/framewidth', get_string('width', 'scorm'), get_string('framewidth', 'scorm'), 100));
foreach(scorm_get_popup_options_array() as $key => $value){
$settings->add(new admin_setting_configcheckbox('scorm/'.$key, get_string($key, 'scorm'),'',$value));
}
$settings->add(new admin_setting_configtext('scorm/frameheight', get_string('height', 'scorm'), get_string('frameheight', 'scorm'), 500));
$settings->add(new admin_setting_configselect('scorm/skipview', get_string('skipview', 'scorm'), get_string('skipviewdesc', 'scorm'), 0, scorm_get_skip_view_array()));
$settings->add(new admin_setting_configselect('scorm/popup', get_string('display','scorm'), get_string('displaydesc','scorm'), 0, scorm_get_popup_display_array()));
$settings->add(new admin_setting_configselect('scorm/hidebrowse', get_string('hidebrowse', 'scorm'), get_string('hidebrowsedesc', 'scorm'), 0, $yesno));
foreach(scorm_get_popup_options_array() as $key => $value){
$settings->add(new admin_setting_configcheckbox('scorm/'.$key, get_string($key, 'scorm'),'',$value));
}
$settings->add(new admin_setting_configselect('scorm/hidetoc', get_string('hidetoc', 'scorm'), get_string('hidetocdesc', 'scorm'), 0, scorm_get_hidetoc_array()));
$settings->add(new admin_setting_configselect('scorm/skipview', get_string('skipview', 'scorm'), get_string('skipviewdesc', 'scorm'), 0, scorm_get_skip_view_array()));
$settings->add(new admin_setting_configselect('scorm/hidenav', get_string('hidenav', 'scorm'), get_string('hidenavdesc', 'scorm'), 0, $yesno));
$settings->add(new admin_setting_configselect('scorm/hidebrowse', get_string('hidebrowse', 'scorm'), get_string('hidebrowsedesc', 'scorm'), 0, $yesno));
$settings->add(new admin_setting_configselect('scorm/auto', get_string('autocontinue', 'scorm'), get_string('autocontinuedesc', 'scorm'), 0, $yesno));
$settings->add(new admin_setting_configselect('scorm/hidetoc', get_string('hidetoc', 'scorm'), get_string('hidetocdesc', 'scorm'), 0, scorm_get_hidetoc_array()));
$settings->add(new admin_setting_configselect('scorm/updatefreq', get_string('updatefreq', 'scorm'), get_string('updatefreqdesc', 'scorm'), 0, scorm_get_updatefreq_array()));
$settings->add(new admin_setting_configselect('scorm/hidenav', get_string('hidenav', 'scorm'), get_string('hidenavdesc', 'scorm'), 0, $yesno));
$settings->add(new admin_setting_configtext('scorm/updatetime', get_string('updatetime', 'scorm'), '', 2, PARAM_INT));
$settings->add(new admin_setting_configselect('scorm/auto', get_string('autocontinue', 'scorm'), get_string('autocontinuedesc', 'scorm'), 0, $yesno));
$settings->add(new admin_setting_configcheckbox('scorm/allowtypeexternal', get_string('allowtypeexternal', 'scorm'), '', 0));
$settings->add(new admin_setting_configselect('scorm/updatefreq', get_string('updatefreq', 'scorm'), get_string('updatefreqdesc', 'scorm'), 0, scorm_get_updatefreq_array()));
$settings->add(new admin_setting_configcheckbox('scorm/allowtypelocalsync', get_string('allowtypelocalsync', 'scorm'), '', 0));
$settings->add(new admin_setting_configtext('scorm/updatetime', get_string('updatetime', 'scorm'), '', 2, PARAM_INT));
$settings->add(new admin_setting_configcheckbox('scorm/allowtypeimsrepository', get_string('allowtypeimsrepository', 'scorm'), '', 0));
$settings->add(new admin_setting_configcheckbox('scorm/allowtypeexternal', get_string('allowtypeexternal', 'scorm'), '', 0));
$settings->add(new admin_setting_configcheckbox('scorm/allowapidebug', get_string('allowapidebug', 'scorm'), '', 0));
$settings->add(new admin_setting_configcheckbox('scorm/allowtypelocalsync', get_string('allowtypelocalsync', 'scorm'), '', 0));
$settings->add(new admin_setting_configtext('scorm/apidebugmask', get_string('apidebugmask', 'scorm'), '', '/.*/'));
$settings->add(new admin_setting_configcheckbox('scorm/allowtypeimsrepository', get_string('allowtypeimsrepository', 'scorm'), '', 0));
$settings->add(new admin_setting_configcheckbox('scorm/allowapidebug', get_string('allowapidebug', 'scorm'), '', 0));
$settings->add(new admin_setting_configtext('scorm/apidebugmask', get_string('apidebugmask', 'scorm'), '', '/.*/'));
}
......@@ -38,6 +38,7 @@ required changes in code:
* replace helps with new 'xxx_hlp' strings
optional - no changes needed in older code:
* settingstree.php replaced by settings.php - just unset the $settings if you want to make custom part of settings admin tree
* support for new mforms editor element and embedded files
(not finished yet)
* portfolio support
......
......@@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
require_once("$CFG->libdir/resourcelib.php");
......
......@@ -27,63 +27,66 @@
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot.'/mod/workshop/locallib.php');
if ($ADMIN->fulltree) {
require_once($CFG->dirroot.'/mod/workshop/locallib.php'); //TODO: do not include this here, we do not want ws code in each page!!
$grades = workshop::available_maxgrades_list();
$grades = workshop::available_maxgrades_list();
$settings->add(new admin_setting_configselect('workshop/grade', get_string('submissiongrade', 'workshop'),
get_string('configgrade', 'workshop'), 80, $grades));
$settings->add(new admin_setting_configselect('workshop/grade', get_string('submissiongrade', 'workshop'),
get_string('configgrade', 'workshop'), 80, $grades));
$settings->add(new admin_setting_configselect('workshop/gradinggrade', get_string('gradinggrade', 'workshop'),
get_string('configgradinggrade', 'workshop'), 20, $grades));
$settings->add(new admin_setting_configselect('workshop/gradinggrade', get_string('gradinggrade', 'workshop'),
get_string('configgradinggrade', 'workshop'), 20, $grades));
$options = array();
for ($i = 5; $i >= 0; $i--) {
$options[$i] = $i;
}
$settings->add(new admin_setting_configselect('workshop/gradedecimals', get_string('gradedecimals', 'workshop'),
get_string('configgradedecimals', 'workshop'), 0, $options));
$options = array();
for ($i = 5; $i >= 0; $i--) {
$options[$i] = $i;
}
$settings->add(new admin_setting_configselect('workshop/gradedecimals', get_string('gradedecimals', 'workshop'),
get_string('configgradedecimals', 'workshop'), 0, $options));
if (isset($CFG->maxbytes)) {
$options = get_max_upload_sizes($CFG->maxbytes);
$options[0] = get_string('courseuploadlimit');
$settings->add(new admin_setting_configselect('workshop/maxbytes', get_string('maxbytes', 'workshop'),
get_string('configmaxbytes', 'workshop'), 0, $options));
}
if (isset($CFG->maxbytes)) {
$options = get_max_upload_sizes($CFG->maxbytes);
$options[0] = get_string('courseuploadlimit');
$settings->add(new admin_setting_configselect('workshop/maxbytes', get_string('maxbytes', 'workshop'),
get_string('configmaxbytes', 'workshop'), 0, $options));
}
$settings->add(new admin_setting_configselect('workshop/strategy', get_string('strategy', 'workshop'),
get_string('configstrategy', 'workshop'), 'accumulative', workshop::available_strategies_list()));
$settings->add(new admin_setting_configselect('workshop/strategy', get_string('strategy', 'workshop'),
get_string('configstrategy', 'workshop'), 'accumulative', workshop::available_strategies_list()));
$options = workshop::available_example_modes_list();
$settings->add(new admin_setting_configselect('workshop/examplesmode', get_string('examplesmode', 'workshop'),
get_string('configexamplesmode', 'workshop'), workshop::EXAMPLES_VOLUNTARY, $options));
$options = workshop::available_example_modes_list();
$settings->add(new admin_setting_configselect('workshop/examplesmode', get_string('examplesmode', 'workshop'),
get_string('configexamplesmode', 'workshop'), workshop::EXAMPLES_VOLUNTARY, $options));
// include the settings of allocation subplugins
$allocators = get_plugin_list('workshopallocation');
foreach ($allocators as $allocator => $path) {
if (file_exists($settingsfile = $path . '/settings.php')) {
$settings->add(new admin_setting_heading('workshopallocationsetting'.$allocator,
get_string('allocation', 'workshop') . ' - ' . get_string('pluginname', 'workshopallocation_' . $allocator), ''));
include($settingsfile);
// include the settings of allocation subplugins
$allocators = get_plugin_list('workshopallocation');
foreach ($allocators as $allocator => $path) {
if (file_exists($settingsfile = $path . '/settings.php')) {
$settings->add(new admin_setting_heading('workshopallocationsetting'.$allocator,
get_string('allocation', 'workshop') . ' - ' . get_string('pluginname', 'workshopallocation_' . $allocator), ''));
include($settingsfile);
}
}
}
// include the settings of grading strategy subplugins
$strategies = get_plugin_list('workshopform');
foreach ($strategies as $strategy => $path) {
if (file_exists($settingsfile = $path . '/settings.php')) {
$settings->add(new admin_setting_heading('workshopformsetting'.$strategy,
get_string('strategy', 'workshop') . ' - ' . get_string('pluginname', 'workshopform_' . $strategy), ''));
include($settingsfile);
// include the settings of grading strategy subplugins
$strategies = get_plugin_list('workshopform');
foreach ($strategies as $strategy => $path) {
if (file_exists($settingsfile = $path . '/settings.php')) {
$settings->add(new admin_setting_heading('workshopformsetting'.$strategy,
get_string('strategy', 'workshop') . ' - ' . get_string('pluginname', 'workshopform_' . $strategy), ''));
include($settingsfile);
}
}
}
// include the settings of grading evaluation subplugins
$evaluations = get_plugin_list('workshopeval');
foreach ($evaluations as $evaluation => $path) {
if (file_exists($settingsfile = $path . '/settings.php')) {
$settings->add(new admin_setting_heading('workshopevalsetting'.$evaluation,
get_string('evaluation', 'workshop') . ' - ' . get_string('pluginname', 'workshopeval_' . $evaluation), ''));
include($settingsfile);
// include the settings of grading evaluation subplugins
$evaluations = get_plugin_list('workshopeval');
foreach ($evaluations as $evaluation => $path) {
if (file_exists($settingsfile = $path . '/settings.php')) {
$settings->add(new admin_setting_heading('workshopevalsetting'.$evaluation,
get_string('evaluation', 'workshop') . ' - ' . get_string('pluginname', 'workshopeval_' . $evaluation), ''));
include($settingsfile);
}
}
}
......@@ -4,47 +4,45 @@
* Settings for the arialist theme
*/
// Create our admin page
$temp = new admin_settingpage('theme_arialist', get_string('configtitle','theme_arialist'));
// Logo file setting
$name = 'theme_arialist/logo';
$title = get_string('logo','theme_arialist');
$description = get_string('logodesc', 'theme_arialist');
$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
$temp->add($setting);
// Tagline setting
$name = 'theme_arialist/tagline';
$title = get_string('tagline','theme_arialist');
$description = get_string('taglinedesc', 'theme_arialist');
$setting = new admin_setting_configtext($name, $title, $description, '');
$temp->add($setting);
// Link colour setting
$name = 'theme_arialist/linkcolor';
$title = get_string('linkcolor','theme_arialist');
$description = get_string('linkcolordesc', 'theme_arialist');
$default = '#f25f0f';
$previewconfig = array('selector'=>'.block .content', 'style'=>'linkcolor');
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
$temp->add($setting);
// Block region width
$name = 'theme_arialist/regionwidth';
$title = get_string('regionwidth','theme_arialist');
$description = get_string('regionwidthdesc', 'theme_arialist');
$default = 250;
$choices = array(180=>'180px', 190=>'190px', 200=>'200px', 210=>'210px', 220=>'220px', 240=>'240px', 250=>'250px');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$temp->add($setting);
// Custom CSS file
$name = 'theme_arialist/customcss';
$title = get_string('customcss','theme_arialist');
$description = get_string('customcssdesc', 'theme_arialist');
$setting = new admin_setting_configtextarea($name, $title, $description, '');
$temp->add($setting);
// Add our page to the structure of the admin tree
$ADMIN->add('themes', $temp);
\ No newline at end of file
defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
// Logo file setting
$name = 'theme_arialist/logo';
$title = get_string('logo','theme_arialist');
$description = get_string('logodesc', 'theme_arialist');
$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
$settings->add($setting);
// Tagline setting
$name = 'theme_arialist/tagline';
$title = get_string('tagline','theme_arialist');
$description = get_string('taglinedesc', 'theme_arialist');
$setting = new admin_setting_configtext($name, $title, $description, '');
$settings->add($setting);
// Link colour setting
$name = 'theme_arialist/linkcolor';
$title = get_string('linkcolor','theme_arialist');
$description = get_string('linkcolordesc', 'theme_arialist');
$default = '#f25f0f';
$previewconfig = array('selector'=>'.block .content', 'style'=>'linkcolor');
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
$settings->add($setting);
// Block region width
$name = 'theme_arialist/regionwidth';
$title = get_string('regionwidth','theme_arialist');
$description = get_string('regionwidthdesc', 'theme_arialist');
$default = 250;
$choices = array(180=>'180px', 190=>'190px', 200=>'200px', 210=>'210px', 220=>'220px', 240=>'240px', 250=>'250px');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Custom CSS file
$name = 'theme_arialist/customcss';
$title = get_string('customcss','theme_arialist');
$description = get_string('customcssdesc', 'theme_arialist');
$setting = new admin_setting_configtextarea($name, $title, $description, '');
$settings->add($setting);
}
\ No newline at end of file
<?php
/**
* Settings for the formalwhite theme
* Settings for the formal_white theme
*/
// Create our admin page
$temp = new admin_settingpage('theme_formal_white', get_string('configtitle','theme_formal_white'));
// Background colour setting
$name = 'theme_formal_white/backgroundcolor';
$title = get_string('backgroundcolor','theme_formal_white');
$description = get_string('backgroundcolordesc', 'theme_formal_white');
$default = '#F7F6F1';
$previewconfig = array('selector'=>'.block .content', 'style'=>'backgroundColor');
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
$temp->add($setting);
// Logo file setting
$name = 'theme_formal_white/logo';
$title = get_string('logo','theme_formal_white');
$description = get_string('logodesc', 'theme_formal_white');
$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
$temp->add($setting);
// Block region width
$name = 'theme_formal_white/regionwidth';
$title = get_string('regionwidth','theme_formal_white');
$description = get_string('regionwidthdesc', 'theme_formal_white');
$default = 200;
$choices = array(150=>'150px', 170=>'170px', 200=>'200px', 240=>'240px', 290=>'290px', 350=>'350px', 420=>'420px');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$temp->add($setting);
// Foot note setting
$name = 'theme_formal_white/footnote';
$title = get_string('footnote','theme_formal_white');
$description = get_string('footnotedesc', 'theme_formal_white');
$setting = new admin_setting_confightmleditor($name, $title, $description, '');
$temp->add($setting);
// Custom CSS file
$name = 'theme_formal_white/customcss';
$title = get_string('customcss','theme_formal_white');
$description = get_string('customcssdesc', 'theme_formal_white');
$setting = new admin_setting_configtextarea($name, $title, $description, '');
$temp->add($setting);
// Add our page to the structure of the admin tree
$ADMIN->add('themes', $temp);
\ No newline at end of file
defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
// Background colour setting
$name = 'theme_formal_white/backgroundcolor';
$title = get_string('backgroundcolor','theme_formal_white');
$description = get_string('backgroundcolordesc', 'theme_formal_white');
$default = '#F7F6F1';
$previewconfig = array('selector'=>'.block .content', 'style'=>'backgroundColor');
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
$settings->add($setting);
// Logo file setting
$name = 'theme_formal_white/logo';
$title = get_string('logo','theme_formal_white');
$description = get_string('logodesc', 'theme_formal_white');
$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
$settings->add($setting);
// Block region width
$name = 'theme_formal_white/regionwidth';
$title = get_string('regionwidth','theme_formal_white');
$description = get_string('regionwidthdesc', 'theme_formal_white');
$default = 200;
$choices = array(150=>'150px', 170=>'170px', 200=>'200px', 240=>'240px', 290=>'290px', 350=>'350px', 420=>'420px');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Foot note setting
$name = 'theme_formal_white/footnote';
$title = get_string('footnote','theme_formal_white');
$description = get_string('footnotedesc', 'theme_formal_white');
$setting = new admin_setting_confightmleditor($name, $title, $description, '');
$settings->add($setting);
// Custom CSS file
$name = 'theme_formal_white/customcss';
$title = get_string('customcss','theme_formal_white');
$description = get_string('customcssdesc', 'theme_formal_white');
$setting = new admin_setting_configtextarea($name, $title, $description, '');
$settings->add($setting);
}
\ No newline at end of file
......@@ -28,33 +28,31 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// Create our admin page
$temp = new admin_settingpage('theme_nonzero', get_string('configtitle','theme_nonzero'));
defined('MOODLE_INTERNAL') || die;
// Block region-pre width
$name = 'theme_nonzero/regionprewidth';
$title = get_string('regionprewidth','theme_nonzero');
$description = get_string('regionprewidthdesc', 'theme_nonzero');
$default = 200;
$choices = array(180=>'180px', 190=>'190px', 200=>'200px', 210=>'210px', 220=>'220px', 230=>'230px', 240=>'240px', 250=>'250px', 260=>'260px');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$temp->add($setting);
if ($ADMIN->fulltree) {
// Block region-pre width
$name = 'theme_nonzero/regionprewidth';
$title = get_string('regionprewidth','theme_nonzero');
$description = get_string('regionprewidthdesc', 'theme_nonzero');
$default = 200;
$choices = array(180=>'180px', 190=>'190px', 200=>'200px', 210=>'210px', 220=>'220px', 230=>'230px', 240=>'240px', 250=>'250px', 260=>'260px');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Block region-post width
$name = 'theme_nonzero/regionpostwidth';
$title = get_string('regionpostwidth','theme_nonzero');
$description = get_string('regionpostwidthdesc', 'theme_nonzero');
$default = 200;
$choices = array(180=>'180px', 190=>'190px', 200=>'200px', 210=>'210px', 220=>'220px', 230=>'230px', 240=>'240px', 250=>'250px', 260=>'260px');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$temp->add($setting);
// Block region-post width
$name = 'theme_nonzero/regionpostwidth';
$title = get_string('regionpostwidth','theme_nonzero');
$description = get_string('regionpostwidthdesc', 'theme_nonzero');
$default = 200;
$choices = array(180=>'180px', 190=>'190px', 200=>'200px', 210=>'210px', 220=>'220px', 230=>'230px', 240=>'240px', 250=>'250px', 260=>'260px');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Custom CSS file
$name = 'theme_nonzero/customcss';
$title = get_string('customcss','theme_nonzero');
$description = get_string('customcssdesc', 'theme_nonzero');
$setting = new admin_setting_configtextarea($name, $title, $description, '');
$temp->add($setting);
// Add our page to the structure of the admin tree
$ADMIN->add('themes', $temp);
\ No newline at end of file
// Custom CSS file
$name = 'theme_nonzero/customcss';
$title = get_string('customcss','theme_nonzero');
$description = get_string('customcssdesc', 'theme_nonzero');
$setting = new admin_setting_configtextarea($name, $title, $description, '');
$settings->add($setting);
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment