lib/evalmath/
lib/lessphp/
lib/phpexcel/
-lib/pear/Net/
lib/google/
lib/htmlpurifier/
lib/jabber/
lib/mustache/
lib/amd/src/mustache.js
lib/graphlib.php
+lib/php-css-parser/
+lib/rtlcss/
+lib/scssphp/
lib/spout/
lib/amd/src/chartjs-lazy.js
+lib/maxmind/GeoIp2/
+lib/maxmind/MaxMind/
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
+theme/boost/scss/bootstrap/
+theme/boost/amd/src/alert.js
+theme/boost/amd/src/button.js
+theme/boost/amd/src/carousel.js
+theme/boost/amd/src/collapse.js
+theme/boost/amd/src/dropdown.js
+theme/boost/amd/src/modal.js
+theme/boost/amd/src/popover.js
+theme/boost/amd/src/scrollspy.js
+theme/boost/amd/src/tab.js
+theme/boost/amd/src/tooltip.js
+theme/boost/amd/src/util.js
+theme/boost/amd/src/tether.js
+theme/boost/scss/preset-flatly.scss
+theme/boost/scss/preset-paper.scss
+theme/boost/scss/preset-readable.scss
theme/bootstrapbase/less/bootstrap/
theme/bootstrapbase/javascript/html5shiv.js
theme/bootstrapbase/amd/src/bootstrap.js
\ No newline at end of file
lib/evalmath/
lib/lessphp/
lib/phpexcel/
-lib/pear/Net/
lib/google/
lib/htmlpurifier/
lib/jabber/
lib/mustache/
lib/amd/src/mustache.js
lib/graphlib.php
+lib/php-css-parser/
+lib/rtlcss/
+lib/scssphp/
lib/spout/
lib/amd/src/chartjs-lazy.js
+lib/maxmind/GeoIp2/
+lib/maxmind/MaxMind/
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
+theme/boost/scss/bootstrap/
+theme/boost/amd/src/alert.js
+theme/boost/amd/src/button.js
+theme/boost/amd/src/carousel.js
+theme/boost/amd/src/collapse.js
+theme/boost/amd/src/dropdown.js
+theme/boost/amd/src/modal.js
+theme/boost/amd/src/popover.js
+theme/boost/amd/src/scrollspy.js
+theme/boost/amd/src/tab.js
+theme/boost/amd/src/tooltip.js
+theme/boost/amd/src/util.js
+theme/boost/amd/src/tether.js
+theme/boost/scss/preset-flatly.scss
+theme/boost/scss/preset-paper.scss
+theme/boost/scss/preset-readable.scss
theme/bootstrapbase/less/bootstrap/
theme/bootstrapbase/javascript/html5shiv.js
theme/bootstrapbase/amd/src/bootstrap.js
\ No newline at end of file
{
"rules": {
"at-rule-empty-line-before": [ "always",
- {"except": [ "blockless-group", "first-nested" ], ignore: ["after-comment"]}
+ {"except": [ "blockless-group"], ignore: ["after-comment", "all-nested"]}
],
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
- "at-rule-no-unknown": true,
+ "at-rule-no-unknown": null, # Enabled for non-scss in grunt.
"at-rule-semicolon-newline-after": "always",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always-multi-line",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
- "no-browser-hacks": [true, { "severity": "warning" }],
+ "no-browser-hacks": null, # Enabled for non-scss in grunt.
"no-empty-source": true,
"no-eol-whitespace": true,
"no-extra-semicolons": [true, { "severity": "warning" }],
"shorthand-property-no-redundant-values": [null, { "severity": "warning" }],
"string-no-newline": true,
"time-no-imperceptible": true,
- "unit-blacklist": ["pt", "rem"],
+ "unit-blacklist": ["pt"],
"unit-case": "lower",
"unit-no-unknown": true,
- "value-keyword-case": ["lower", {"ignoreKeywords": ["/@/"]}],
+ "value-keyword-case": ["lower", {"ignoreKeywords": ["/(@|$)/"]}],
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
cwd = process.env.PWD || process.cwd(),
async = require('async'),
DOMParser = require('xmldom').DOMParser,
- xpath = require('xpath');
+ xpath = require('xpath'),
+ semver = require('semver');
+
+ // Verify the node version is new enough.
+ var expected = semver.validRange(grunt.file.readJSON('package.json').engines.node);
+ var actual = semver.valid(process.version);
+ if (!semver.satisfies(actual, expected)) {
+ grunt.fail.fatal('Node version too old. Require ' + expected + ', version installed: ' + actual);
+ }
// Windows users can't run grunt in a subdirectory, so allow them to set
// the root by passing --root=path/to/dir.
"theme/bootstrapbase/style/editor.css": "theme/bootstrapbase/less/editor.less",
},
options: {
- compress: true
+ compress: false // We must not compress to keep the comments.
}
}
},
"selector-type-no-unknown": null,
"length-zero-no-unit": null,
"color-hex-case": null,
- "color-hex-length": null
+ "color-hex-length": null,
+ // These rules have to be disabled in .stylelintrc for scss compat.
+ "at-rule-no-unknown": true,
+ "no-browser-hacks": [true, {"severity": "warning"}]
}
}
},
src: ['theme/**/*.less']
+ },
+ scss: {
+ options: {syntax: 'scss'},
+ src: ['*/**/*.scss']
}
}
});
grunt.registerTask('js', ['amd', 'yui']);
// Register CSS taks.
- grunt.registerTask('css', ['stylelint:less', 'less:bootstrapbase']);
+ grunt.registerTask('css', ['stylelint:scss', 'stylelint:less', 'less:bootstrapbase']);
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', tasks.startup);
/**
* This script implements some useful svg manipulation tricks.
*
- * @package theme_base
+ * @package core_admin
* @subpackage cli
* @copyright 2012 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
define('CLI_SCRIPT', true);
-require(__DIR__.'/../../../config.php');
+require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
// Now get cli options.
}
if ($options['ie9fix']) {
- theme_base_recurse_svgs($path, '', 'theme_base_svgtool_ie9fix', $blacklist);
+ core_admin_recurse_svgs($path, '', 'core_admin_svgtool_ie9fix', $blacklist);
} else if ($options['noaspectratio']) {
- theme_base_recurse_svgs($path, '', 'theme_base_svgtool_noaspectratio', $blacklist);
+ core_admin_recurse_svgs($path, '', 'core_admin_svgtool_noaspectratio', $blacklist);
} else {
$help =
*
* @param string $file
*/
-function theme_base_svgtool_ie9fix($file) {
+function core_admin_svgtool_ie9fix($file) {
global $CFG;
if (strpos($file, $CFG->dirroot.DIRECTORY_SEPARATOR) === 0) {
*
* @param string $file
*/
-function theme_base_svgtool_noaspectratio($file) {
+function core_admin_svgtool_noaspectratio($file) {
global $CFG;
if (strpos($file, $CFG->dirroot.DIRECTORY_SEPARATOR) === 0) {
* @param string $filecallback
* @param array $blacklist
*/
-function theme_base_recurse_svgs($base, $sub, $filecallback, $blacklist) {
+function core_admin_recurse_svgs($base, $sub, $filecallback, $blacklist) {
if (is_dir("$base/$sub")) {
$items = new DirectoryIterator("$base/$sub");
foreach ($items as $item) {
continue;
}
$file = $item->getFilename();
- theme_base_recurse_svgs("$base/$sub", $file, $filecallback, $blacklist);
+ core_admin_recurse_svgs("$base/$sub", $file, $filecallback, $blacklist);
}
unset($item);
unset($items);
echo $OUTPUT->header();
- echo '<div class="phpinfo">';
+ echo '<div class="phpinfo text-ltr">';
ob_start();
phpinfo(INFO_GENERAL + INFO_CONFIGURATION + INFO_MODULES + INFO_VARIABLES);
array('class' => 'registration_textfield'));
$mform->setType('contactphone', PARAM_TEXT);
$mform->addHelpButton('contactphone', 'sitephone', 'hub');
+ $mform->setForceLtr('contactphone');
$mform->addElement('text', 'contactemail', get_string('siteemail', 'hub'),
array('class' => 'registration_textfield'));
echo $OUTPUT->notification($statusmsg, 'notifysuccess');
}
-$resultshtml = admin_search_settings_html($query); // case insensitive search only
-
-echo '<form action="' . $PAGE->url->out(true) . '" method="post" id="adminsettings">';
-echo '<div>';
-echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
-// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
-echo prevent_form_autofill_password();
-echo '</div>';
-echo '<fieldset>';
-echo '<div class="clearer"><!-- --></div>';
-if ($resultshtml != '') {
- echo $resultshtml;
-} else {
- echo get_string('noresults','admin');
-}
-echo '</fieldset>';
-echo '</form>';
+echo admin_search_settings_html($query);
echo $OUTPUT->footer();
-
-
// ---------------------------------------------------------------------------------------------------------------
- echo '<form action="' . $PAGE->url . '" method="post" id="adminsettings">';
- echo '<div class="settingsform clearfix">';
- echo html_writer::input_hidden_params($PAGE->url);
- echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
- echo '<input type="hidden" name="return" value="'.$return.'" />';
- // HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
- echo prevent_form_autofill_password();
-
- echo $settingspage->output_html();
-
- echo '<div class="form-buttons"><input class="form-submit" type="submit" value="'.get_string('savechanges','admin').'" /></div>';
-
- echo '</div>';
- echo '</form>';
+ $pageparams = $PAGE->url->params();
+ $context = [
+ 'actionurl' => $PAGE->url->out(false),
+ 'params' => array_map(function($param) use ($pageparams) {
+ return [
+ 'name' => $param,
+ 'value' => $pageparams[$param]
+ ];
+ }, array_keys($pageparams)),
+ 'sesskey' => sesskey(),
+ 'return' => $return,
+ 'title' => null,
+ 'settings' => $settingspage->output_html(),
+ 'showsave' => true
+ ];
+
+ echo $OUTPUT->render_from_template('core_admin/settings', $context);
} else {
if ($PAGE->user_allowed_editing()) {
// ---------------------------------------------------------------------------------------------------------------
- echo '<form action="' . $PAGE->url . '" method="post" id="adminsettings">';
- echo '<div class="settingsform clearfix">';
- echo html_writer::input_hidden_params($PAGE->url);
- echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
- echo '<input type="hidden" name="return" value="'.$return.'" />';
- // HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
- echo prevent_form_autofill_password();
- echo $OUTPUT->heading($settingspage->visiblename);
-
- echo $settingspage->output_html();
-
- if ($settingspage->show_save()) {
- echo '<div class="form-buttons"><input class="form-submit" type="submit" value="'.get_string('savechanges','admin').'" /></div>';
- }
-
- echo '</div>';
- echo '</form>';
+ $pageparams = $PAGE->url->params();
+ $context = [
+ 'actionurl' => $PAGE->url->out(false),
+ 'params' => array_map(function($param) use ($pageparams) {
+ return [
+ 'name' => $param,
+ 'value' => $pageparams[$param]
+ ];
+ }, array_keys($pageparams)),
+ 'sesskey' => sesskey(),
+ 'return' => $return,
+ 'title' => $settingspage->visiblename,
+ 'settings' => $settingspage->output_html(),
+ 'showsave' => $settingspage->show_save()
+ ];
+
+ echo $OUTPUT->render_from_template('core_admin/settings', $context);
}
$PAGE->requires->yui_module('moodle-core-formchangechecker',
$ADMIN->add('appearance', new admin_category('themes', new lang_string('themes')));
// "themesettings" settingpage
$temp = new admin_settingpage('themesettings', new lang_string('themesettings', 'admin'));
- $temp->add(new admin_setting_configtext('themelist', new lang_string('themelist', 'admin'), new lang_string('configthemelist','admin'), '', PARAM_NOTAGS));
+ $setting = new admin_setting_configtext('themelist', new lang_string('themelist', 'admin'),
+ new lang_string('configthemelist', 'admin'), '', PARAM_NOTAGS);
+ $setting->set_force_ltr(true);
+ $temp->add($setting);
$setting = new admin_setting_configcheckbox('themedesignermode', new lang_string('themedesignermode', 'admin'), new lang_string('configthemedesignermode', 'admin'), 0);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
$temp->add(new admin_setting_configcheckbox('allowthemechangeonurl', new lang_string('allowthemechangeonurl', 'admin'), new lang_string('configallowthemechangeonurl', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', new lang_string('allowuserblockhiding', 'admin'), new lang_string('configallowuserblockhiding', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('allowblockstodock', new lang_string('allowblockstodock', 'admin'), new lang_string('configallowblockstodock', 'admin'), 1));
- $temp->add(new admin_setting_configtextarea('custommenuitems', new lang_string('custommenuitems', 'admin'), new lang_string('configcustommenuitems', 'admin'), '', PARAM_TEXT, '50', '10'));
+ $temp->add(new admin_setting_configtextarea('custommenuitems', new lang_string('custommenuitems', 'admin'),
+ new lang_string('configcustommenuitems', 'admin'), '', PARAM_RAW, '50', '10'));
$temp->add(new admin_setting_configtextarea(
'customusermenuitems',
new lang_string('customusermenuitems', 'admin'),
'grades,grades|/grade/report/mygrades.php|grades
messages,message|/message/index.php|message
preferences,moodle|/user/preferences.php|preferences',
- PARAM_TEXT,
+ PARAM_RAW,
'50',
'10'
));
$setting->set_updatedcallback('js_reset_all_caches');
$temp->add($setting);
$temp->add(new admin_setting_configcheckbox('modchooserdefault', new lang_string('modchooserdefault', 'admin'), new lang_string('configmodchooserdefault', 'admin'), 1));
- $temp->add(new admin_setting_configcheckbox('modeditingmenu', new lang_string('modeditingmenu', 'admin'), new lang_string('modeditingmenu_desc', 'admin'), 1));
- $temp->add(new admin_setting_configcheckbox('blockeditingmenu', new lang_string('blockeditingmenu', 'admin'), new lang_string('blockeditingmenu_desc', 'admin'), 1));
$ADMIN->add('appearance', $temp);
// link to tag management interface
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_filters', new lang_string('generalfilters','backup'), new lang_string('configgeneralfilters','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_comments', new lang_string('generalcomments','backup'), new lang_string('configgeneralcomments','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_badges', new lang_string('generalbadges','backup'), new lang_string('configgeneralbadges','backup'), array('value'=>1,'locked'=>0)));
+ $temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_calendarevents', new lang_string('generalcalendarevents','backup'), new lang_string('configgeneralcalendarevents','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_userscompletion', new lang_string('generaluserscompletion','backup'), new lang_string('configgeneraluserscompletion','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_logs', new lang_string('generallogs','backup'), new lang_string('configgenerallogs','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_groups',
new lang_string('generalgroups', 'backup'), new lang_string('configgeneralgroups', 'backup'),
array('value' => 1, 'locked' => 0)));
+ $temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_competencies', new lang_string('generalcompetencies','backup'), new lang_string('configgeneralcompetencies','backup'), array('value'=>1, 'locked'=>0)));
$ADMIN->add('backups', $temp);
$temp->add(new admin_setting_configcheckbox('backup/import_general_duplicate_admin_allowed',
new lang_string('importgeneralduplicateadminallowed', 'backup'),
new lang_string('importgeneralduplicateadminallowed_desc', 'backup'), 0));
+
+ // Import defaults section.
+ $temp->add(new admin_setting_heading('importsettings', new lang_string('importsettings', 'backup'), ''));
+ $temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_activities', new lang_string('generalactivities','backup'), new lang_string('configgeneralactivities','backup'), array('value'=>1, 'locked'=>0)));
+ $temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_blocks', new lang_string('generalblocks','backup'), new lang_string('configgeneralblocks','backup'), array('value'=>1, 'locked'=>0)));
+ $temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_filters', new lang_string('generalfilters','backup'), new lang_string('configgeneralfilters','backup'), array('value'=>1, 'locked'=>0)));
+ $temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_calendarevents', new lang_string('generalcalendarevents','backup'), new lang_string('configgeneralcalendarevents','backup'), array('value'=>1, 'locked'=>0)));
+ $temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), array('value'=>1, 'locked'=>0)));
+ $temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_groups',
+ new lang_string('generalgroups', 'backup'), new lang_string('configgeneralgroups', 'backup'),
+ array('value' => 1, 'locked' => 0)));
+ $temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_competencies', new lang_string('generalcompetencies','backup'), new lang_string('configgeneralcompetencies','backup'), array('value'=>1, 'locked'=>0)));
+
$ADMIN->add('backups', $temp);
// Create a page for automated backups configuration and defaults.
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_filters', new lang_string('generalfilters','backup'), new lang_string('configgeneralfilters','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_comments', new lang_string('generalcomments','backup'), new lang_string('configgeneralcomments','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_badges', new lang_string('generalbadges','backup'), new lang_string('configgeneralbadges','backup'), 1));
+ $temp->add(new admin_setting_configcheckbox('backup/backup_auto_calendarevents', new lang_string('generalcalendarevents','backup'), new lang_string('configgeneralcalendarevents','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_userscompletion', new lang_string('generaluserscompletion','backup'), new lang_string('configgeneraluserscompletion','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_logs', new lang_string('generallogs', 'backup'), new lang_string('configgenerallogs', 'backup'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_groups', new lang_string('generalgroups', 'backup'),
new lang_string('configgeneralgroups', 'backup'), 1));
+ $temp->add(new admin_setting_configcheckbox('backup/backup_auto_competencies', new lang_string('generalcompetencies','backup'), new lang_string('configgeneralcompetencies','backup'), 1));
//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_messages', new lang_string('messages', 'message'), new lang_string('backupmessageshelp','message'), 0));
//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_blogs', new lang_string('blogs', 'blog'), new lang_string('backupblogshelp','blog'), 0));
GRADE_NAVMETHOD_TABS => new lang_string('tabs', 'grades'),
GRADE_NAVMETHOD_COMBO => new lang_string('combo', 'grades'))));
- $temp->add(new admin_setting_configtext('grade_export_userprofilefields', new lang_string('gradeexportuserprofilefields', 'grades'), new lang_string('gradeexportuserprofilefields_desc', 'grades'), 'firstname,lastname,idnumber,institution,department,email', PARAM_TEXT));
-
- $temp->add(new admin_setting_configtext('grade_export_customprofilefields', new lang_string('gradeexportcustomprofilefields', 'grades'), new lang_string('gradeexportcustomprofilefields_desc', 'grades'), '', PARAM_TEXT));
+ $setting = new admin_setting_configtext('grade_export_userprofilefields',
+ new lang_string('gradeexportuserprofilefields', 'grades'),
+ new lang_string('gradeexportuserprofilefields_desc', 'grades'),
+ 'firstname,lastname,idnumber,institution,department,email', PARAM_TEXT);
+ $setting->set_force_ltr(true);
+ $temp->add($setting);
+
+ $setting = new admin_setting_configtext('grade_export_customprofilefields',
+ new lang_string('gradeexportcustomprofilefields', 'grades'),
+ new lang_string('gradeexportcustomprofilefields_desc', 'grades'), '', PARAM_TEXT);
+ $setting->set_force_ltr(true);
+ $temp->add($setting);
$temp->add(new admin_setting_configcheckbox('recovergradesdefault', new lang_string('recovergradesdefault', 'grades'), new lang_string('recovergradesdefault_help', 'grades'), 0));
$temp->add(new admin_setting_configtext('defaultcity', new lang_string('defaultcity', 'admin'), new lang_string('defaultcity_help', 'admin'), ''));
$temp->add(new admin_setting_heading('iplookup', new lang_string('iplookup', 'admin'), new lang_string('iplookupinfo', 'admin')));
- $temp->add(new admin_setting_configfile('geoipfile', new lang_string('geoipfile', 'admin'), new lang_string('configgeoipfile', 'admin', $CFG->dataroot.'/geoip/'), $CFG->dataroot.'/geoip/GeoLiteCity.dat'));
+ $temp->add(new admin_setting_configfile('geoip2file', new lang_string('geoipfile', 'admin'),
+ new lang_string('configgeoipfile', 'admin', $CFG->dataroot.'/geoip/'), $CFG->dataroot.'/geoip/GeoLite2-City.mmdb'));
$temp->add(new admin_setting_configtext('googlemapkey3', new lang_string('googlemapkey3', 'admin'), new lang_string('googlemapkey3_help', 'admin'), '', PARAM_RAW, 60));
$temp->add(new admin_setting_configtext('allcountrycodes', new lang_string('allcountrycodes', 'admin'), new lang_string('configallcountrycodes', 'admin'), '', '/^(?:\w+(?:,\w+)*)?$/'));
new lang_string('forgottenpassword', 'auth'), ''));
$temp->add(new admin_setting_confightmleditor('auth_instructions', new lang_string('instructions', 'auth'),
new lang_string('authinstructions', 'auth'), ''));
- $temp->add(new admin_setting_configtext('allowemailaddresses', new lang_string('allowemailaddresses', 'admin'), new lang_string('configallowemailaddresses', 'admin'), '', PARAM_NOTAGS));
- $temp->add(new admin_setting_configtext('denyemailaddresses', new lang_string('denyemailaddresses', 'admin'), new lang_string('configdenyemailaddresses', 'admin'), '', PARAM_NOTAGS));
+ $setting = new admin_setting_configtext('allowemailaddresses', new lang_string('allowemailaddresses', 'admin'),
+ new lang_string('configallowemailaddresses', 'admin'), '', PARAM_NOTAGS);
+ $setting->set_force_ltr(true);
+ $temp->add($setting);
+ $setting = new admin_setting_configtext('denyemailaddresses', new lang_string('denyemailaddresses', 'admin'),
+ new lang_string('configdenyemailaddresses', 'admin'), '', PARAM_NOTAGS);
+ $setting->set_force_ltr(true);
+ $temp->add($setting);
$temp->add(new admin_setting_configcheckbox('verifychangedemail', new lang_string('verifychangedemail', 'admin'), new lang_string('configverifychangedemail', 'admin'), 1));
- $temp->add(new admin_setting_configtext('recaptchapublickey', new lang_string('recaptchapublickey', 'admin'), new lang_string('configrecaptchapublickey', 'admin'), '', PARAM_NOTAGS));
- $temp->add(new admin_setting_configtext('recaptchaprivatekey', new lang_string('recaptchaprivatekey', 'admin'), new lang_string('configrecaptchaprivatekey', 'admin'), '', PARAM_NOTAGS));
+ $setting = new admin_setting_configtext('recaptchapublickey', new lang_string('recaptchapublickey', 'admin'), new lang_string('configrecaptchapublickey', 'admin'), '', PARAM_NOTAGS);
+ $setting->set_force_ltr(true);
+ $temp->add($setting);
+ $setting = new admin_setting_configtext('recaptchaprivatekey', new lang_string('recaptchaprivatekey', 'admin'), new lang_string('configrecaptchaprivatekey', 'admin'), '', PARAM_NOTAGS);
+ $setting->set_force_ltr(true);
+ $temp->add($setting);
$ADMIN->add('authsettings', $temp);
$temp = new admin_externalpage('authtestsettings', get_string('testsettings', 'core_auth'), new moodle_url("/auth/test_settings.php"), 'moodle/site:config', true);
$primaryadminemail = NULL;
$primaryadminname = NULL;
}
-$temp->add(new admin_setting_configtext('supportname', new lang_string('supportname', 'admin'), new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
-$temp->add(new admin_setting_configtext('supportemail', new lang_string('supportemail', 'admin'), new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_NOTAGS));
+$temp->add(new admin_setting_configtext('supportname', new lang_string('supportname', 'admin'),
+ new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
+$setting = new admin_setting_configtext('supportemail', new lang_string('supportemail', 'admin'),
+ new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_NOTAGS);
+$setting->set_force_ltr(true);
+$temp->add($setting);
$temp->add(new admin_setting_configtext('supportpage', new lang_string('supportpage', 'admin'), new lang_string('configsupportpage', 'admin'), '', PARAM_URL));
$ADMIN->add('server', $temp);
'department' => new lang_string('department'),
'institution' => new lang_string('institution'),
)));
- $temp->add(new admin_setting_configtext('fullnamedisplay', new lang_string('fullnamedisplay', 'admin'), new lang_string('configfullnamedisplay', 'admin'), 'language', PARAM_TEXT, 50));
+ $setting = new admin_setting_configtext('fullnamedisplay', new lang_string('fullnamedisplay', 'admin'),
+ new lang_string('configfullnamedisplay', 'admin'), 'language', PARAM_TEXT, 50);
+ $setting->set_force_ltr(true);
+ $temp->add($setting);
$temp->add(new admin_setting_configtext('alternativefullnameformat', new lang_string('alternativefullnameformat', 'admin'),
new lang_string('alternativefullnameformat_desc', 'admin'),
'language', PARAM_RAW, 50));
--- /dev/null
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+ @template core_admin/setting
+
+ Admin setting template.
+
+ Context variables required for this template:
+ * labelfor - id of the form element
+ * title - Setting title
+ * override - Overridden message
+ * warning - Warning message
+ * name - Setting name
+ * error - Error message
+ * element - The Element HTML
+ * forceltr - Force this element to be displayed LTR
+ * default - Default value
+
+ Example context (json):
+ {
+ "title": "Setting title",
+ "labelfor": "id0",
+ "override": "Overidden",
+ "warning": "Warning",
+ "name": "Name",
+ "error": "Error",
+ "element": "Raw HTML",
+ "forceltr": false,
+ "default": "Default value"
+ }
+}}
+<div class="form-item clearfix" id="{{id}}">
+ <div class="form-label">
+ <label {{#labelfor}}for="{{labelfor}}"{{/labelfor}}>
+ {{{title}}}
+ {{#override}}
+ <div class="form-overridden">{{override}}</div>
+ {{/override}}
+ {{#warning}}
+ <div class="form-warning">{{warning}}</div>
+ {{/warning}}
+ </label>
+ <span class="form-shortname">{{{name}}}</span>
+ </div>
+ <div class="form-setting">
+ {{#error}}
+ <div><span class="error">{{error}}</span></div>
+ {{/error}}
+ {{{element}}}
+ {{#default}}
+ <div class="form-defaultinfo {{#forceltr}}text-ltr{{/forceltr}}">{{{default}}}</div>
+ {{/default}}
+ </div>
+ <div class="form-description">{{{description}}}</div>
+</div>
--- /dev/null
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+ @template core_admin/setting_configcheckbox
+
+ Admin checkbox setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * no - no value
+ * value - yes value
+ * id - element id
+ * checked - boole
+
+ Example context (json):
+ {
+ "name": "test",
+ "no": "False",
+ "value": "True",
+ "id": "test0",
+ "checked": "checked"
+ }
+}}
+<div class="form-checkbox defaultsnext">
+ <input type="hidden" name="{{name}}" value="{{no}}">
+ <input type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
+</div>
--- /dev/null
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+ @template core_admin/setting_configcolourpicker
+
+ Admin setting colour picker template.
+
+ Context variables required for this template:
+ * icon - optional icon context (see pix_icon)
+ * name - element name
+ * id - element id
+ * value - element value
+ * haspreviewconfig - show preview of selected color
+
+ Example context (json):
+ {
+ "icon": false,
+ "name": "name0",
+ "id": "id0",
+ "value": "#555655",
+ "haspreviewconfig": false
+ }
+}}
+<div class="form-colourpicker defaultsnext">
+ <div class="admin_colourpicker clearfix">
+ {{#icon}}
+ {{>core/pix_icon}}
+ {{/icon}}
+ </div>
+ <input type="text" name="{{name}}" id="{{id}}" value="{{value}}" size="12" class="text-ltr">
+ {{#haspreviewconfig}}
+ <input type="button" id="{{id}}_preview" value={{#quote}}{{#str}}preview{{/str}}{{/quote}} class="admin_colourpicker_preview">
+ {{/haspreviewconfig}}
+</div>
--- /dev/null
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+ @template core_admin/setting_configdirectory
+
+ Admin directory setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - element id
+ * size - size of the field
+ * readonly - Make the field readonly
+ * value - value
+ * showvalidity - Show a green check if the path is readable
+ * valid - True if the path is readable
+
+ Example context (json):
+ {
+ "name": "test",
+ "value": "/my-super-secret-path/",
+ "id": "test0",
+ "readonly": true,
+ "showvalidity": true,
+ "valid": false
+ }
+}}
+{{>core_admin/setting_configfile}}
--- /dev/null
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+ @template core_admin/setting_configduration
+
+ Admin duration setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * options - list of options for units containing name, value, selected
+ * value - yes
+ * id - element id
+
+ Example context (json):
+ {
+ "name": "test",
+ "value": "5",
+ "id": "test0",
+ "options": [ { "name": "Minutes", "value": "mins", "selected": true } ]
+ }
+}}
+<div class="form-duration defaultsnext">
+ <input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="text-ltr">
+ <label class="accesshide" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
+ <select id="{{id}}u" name="{{name}}[u]">
+ {{#options}}
+ <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
+ {{/options}}
+ </select>
+</div>
+
--- /dev/null
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+ @template core_admin/setting_configempty
+
+ Admin empty setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - element id
+
+ Example context (json):
+ {
+ "name": "test",
+ "id": "test0"
+ }
+}}
+<div class="form-empty">
+ <input type="hidden" name="{{name}}" id="{{id}}" value="">
+</div>
--- /dev/null
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+ @template core_admin/setting_configexecutable
+
+ Admin executable setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - element id
+ * size - size of the field
+ * readonly - Make the field readonly
+ * value - value
+ * showvalidity - Show a green check if the path is readable
+ * valid - True if the path is readable
+
+ Example context (json):
+ {
+ "name": "test",
+ "value": "/usr/bin/cowsay",
+ "id": "test0",
+ "readonly": true,
+ "showvalidity": true,
+ "valid": false
+ }
+}}
+{{>core_admin/setting_configfile}}
--- /dev/null
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+ @template core_admin/setting_configfile
+
+ Admin file setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - element id
+ * size - size of the field
+ * readonly - Make the field readonly
+ * value - value
+ * showvalidity - Show a green check if the path is readable
+ * valid - True if the path is readable
+
+ Example context (json):
+ {
+ "name": "test",
+ "value": "/my-super-secret-path/file",
+ "id": "test0",
+ "readonly": true,
+ "showvalidity": true,
+ "valid": false
+ }
+}}
+<div class="form-file defaultsnext">
+ <input type="text" name="{{name}}" id="{{id}}" size="{{size}}" value="{{value}}" class="text-ltr" {{#readonly}}readonly{{/readonly}}>
+ {{#showvalidity}}
+ {{#valid}}
+ <span class="pathok">✔</span>
+ {{/valid}}
+ {{^valid}}
+ <span class="patherror">✘</span>
+ {{/valid}}
+ {{/showvalidity}}
+</div>
+
--- /dev/null
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+ @template core_admin/setting_confightmleditor
+
+ Admin htmleditor setting template.
+
+ Context variables required for this template:
+ * rows - number of rows
+ * cols - number of cols
+ * id - element id
+ * name - element name
+ * value - default text
+ * forceltr - always ltr
+
+ Example context (json):
+ {
+ "name": "test",
+ "id": "test0",
+ "value": "Your aims are high, and you are capable of much.",
+ "rows": 5,
+ "cols": 30
+ }
+}}
+{{>core_admin/setting_configtextarea}}
--- /dev/null
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+