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/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",
"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);
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
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));
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.
+
+ 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_configmulticheckbox
+
+ Admin multicheckbox setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * hasoptions - there are some options
+ * options - list of options containing name, key, id, checked, label
+
+ Example context (json):
+ {
+ "name": "test",
+ "hasoptions": true,
+ "options": [ { "name": "Option", "key": "k1", "id": "id0", "checked": true, "label": "Option label"} ]
+ }
+}}
+<div class="form-multicheckbox">
+ <input type="hidden" name="{{name}}[xxxxx]" value="1">
+ {{#hasoptions}}
+ <ul>
+ {{#options}}
+ <li>
+ <input type="checkbox" name="{{name}}[{{key}}]" value="1" id="{{id}}_{{key}}" {{#checked}}checked{{/checked}}>
+ <label for="{{id}}_{{key}}">{{{label}}}</label>
+ </li>
+ {{/options}}
+ </ul>
+ {{/hasoptions}}
+</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_configmultiselect
+
+ Admin multiselect setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - element id
+ * size - element size
+ * options - list of options containing name, value, selected
+
+ Example context (json):
+ {
+ "name": "test",
+ "id": "test0",
+ "size": "3",
+ "options": [ { "name": "Option 1", "value": "V", "selected": true },
+ { "name": "Option 2", "value": "V", "selected": true } ]
+ }
+}}
+<div class="form-select">
+ <input type="hidden" name="{{name}}[xxxxx]" value="1">
+ <select id="{{id}}" name="{{name}}[]" size="{{size}}" multiple>
+ {{#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_configpasswordunmask
+
+ Admin password unmask setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * size - form element size
+ * value - form element value
+ * id - element id
+
+ Example context (json):
+ {
+ "name": "test",
+ "id": "test0",
+ "size": "8",
+ "value": "secret"
+ }
+}}
+<div class="form-password">
+ <input type="password" name="{{name}}" size="{{size}}" id="{{id}}" value="{{value}}">
+ <div class="unmask" id="{{id}}unmaskdiv"></div>
+</div>
+{{#js}}
+(function() {
+ var id = '{{id}}';
+ var unmaskid = id + 'unmask';
+ var unmaskdivid = id + 'unmaskdiv';
+ var unmaskstr = {{#quote}}{{#str}}unmaskpassword, form{{/str}}{{/quote}};
+ var is_ie = (navigator.userAgent.toLowerCase().indexOf("msie") != -1);
+
+ document.getElementById(id).setAttribute("autocomplete", "off");
+
+ var unmaskdiv = document.getElementById(unmaskdivid);
+
+ var unmaskchb = document.createElement("input");
+ unmaskchb.setAttribute("type", "checkbox");
+ unmaskchb.setAttribute("id", unmaskid);
+ unmaskchb.onchange = function() {unmaskPassword(id);};
+ unmaskdiv.appendChild(unmaskchb);
+
+ var unmasklbl = document.createElement("label");
+ unmasklbl.innerHTML = unmaskstr;
+ if (is_ie) {
+ unmasklbl.setAttribute("htmlFor", unmaskid);
+ } else {
+ unmasklbl.setAttribute("for", unmaskid);
+ }
+ unmaskdiv.appendChild(unmasklbl);
+
+ if (is_ie) {
+ // Ugly hack to work around the famous onchange IE bug.
+ unmaskchb.onclick = function() {this.blur();};
+ unmaskdiv.onclick = function() {this.blur();};
+ }
+})()
+{{/js}}
--- /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_configselect
+
+ Admin select setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - element id
+ * options - list of options containing name, value, selected
+
+ Example context (json):
+ {
+ "name": "test",
+ "id": "test0",
+ "options": [
+ { "name": "Option 1", "value": "V", "selected": true },
+ { "name": "Option 2", "value": "V", "selected": true }
+ ]
+ }
+}}
+<div class="form-select defaultsnext">
+ <select id="{{id}}" name="{{name}}">
+ {{#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_configtext
+
+ Admin text setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - element id
+ * value - element value
+ * size - element size
+ * forceltr - always display as ltr
+ * attributes - list of additional attributes containing name, value
+
+ Example context (json):
+ {
+ "name": "test",
+ "id": "test0",
+ "value": "A tall, dark stranger will have more fun than you.",
+ "size": "21",
+ "forceltr": false,
+ "attributes": [ { "name": "readonly", "value": "readonly" } ]
+ }
+}}
+<div class="form-text defaultsnext">
+ <input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="{{#forceltr}}text-ltr{{/forceltr}}" {{#attributes}} {{name}}="{{value}}"{{/attributes}}>
+</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_configtextarea
+
+ Admin textarea setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - element id
+ * rows - number of rows
+ * cols - number of cols
+ * value - default value
+ * forceltr - always display as ltr
+
+ Example context (json):
+ {
+ "name": "test",
+ "cols": "30",
+ "rows": "3",
+ "value": "Excellent day for putting Slinkies on an escalator.",
+ "id": "test0"
+ }
+}}
+<div class="form-textarea">
+ <textarea rows="{{rows}}" cols="{{cols}}" id="{{id}}" name="{{name}}" spellcheck="true" class="{{#forceltr}}text-ltr{{/forceltr}}">{{value}}</textarea>
+</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_configtime
+
+ Admin time setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - element id
+ * hours - list of valid hour options containing name, value, selected
+ * minutes - list of valid minute options containing name, value, selected
+
+ Example context (json):
+ {
+ "name": "test",
+ "id": "test0",
+ "minutes": [
+ { "name": "00", "value": "0", "selected": true },
+ { "name": "01", "value": "1", "selected": false }
+ ],
+ "hours": [
+ { "name": "1", "value": "1", "selected": true },
+ { "name": "2", "value": "2", "selected": false }
+ ]
+ }
+}}
+<div class="form-time defaultsnext text-ltr">
+ <label class="accesshide" for="{{id}}h">{{#str}}hours{{/str}}</label>
+ <select id="{{id}}h" name="{{name}}[h]">
+ {{#hours}}
+ <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
+ {{/hours}}
+ </select>:
+ <label class="accesshide" for="{{id}}m">{{#str}}minutes{{/str}}</label>
+ <select id="{{id}}m" name="{{name}}[m]">
+ {{#minutes}}
+ <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
+ {{/minutes}}
+ </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_courselist_frontpage
+
+ Admin courselist_frontpage setting template.
+
+ Context variables required for this template:
+ * selects list of select objects containing id, name, key and options.
+ options is another nested list of items containing name, value and selected
+
+ Example context (json):
+ {
+ "selects": [
+ {
+ "id": "i1",
+ "name": "s1",
+ "key": "k1",
+ "options": [
+ { "name": "Fish", "value": "snapper", "selected": true }
+ ]
+ }
+ ]
+ }
+}}
+<div class="form-group">
+ {{#selects}}
+ <select id="{{id}}{{key}}" name="{{name}}[]">
+ {{#options}}
+ <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
+ {{/options}}
+ </select>
+ <br>
+ {{/selects}}
+</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_devicedetectregex
+
+ Admin devicedetectregex setting template.
+
+ Context variables required for this template:
+ * expressions - List of expressions containing index, name, expression and value
+
+ Example context (json):
+ {
+ "expressions": [
+ { "index": "i1", "name": "Name", "expression": "/bird|yellow/", "value": "Canary" }
+ ]
+ }
+}}
+<table class="generaltable">
+ <thead>
+ <tr>
+ <th>{{#str}}devicedetectregexexpression, admin{{/str}}</th>
+ <th>{{#str}}devicedetectregexvalue, admin{{/str}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#expressions}}
+ <tr>
+ <td class="c{{index}}">
+ <input type="text" name="{{name}}[expression{{index}}]" class="form-text text-ltr" value="{{expression}}">
+ </td>
+ <td class="c{{index}}">
+ <input type="text" name="{{name}}[value{{index}}]" class="form-text text-ltr" value="{{value}}">
+ </td>
+ </tr>
+ {{/expressions}}
+ </tbody>
+</table>
--- /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_emoticons
+
+ Admin emoticons setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - element id
+
+ Example context (json):
+ {
+ "emoticons": [
+ { "fields": [
+ { "name": "Smile", "field": "f1", "value": ":)" }
+ ]}
+ ]
+ }
+}}
+<div class="form-group">
+ <table id="emoticonsetting" class="admintable generaltable">
+ <thead>
+ <tr>
+ <th>{{#str}}emoticontext, admin{{/str}}</th>
+ <th>{{#str}}emoticonimagename, admin{{/str}}</th>
+ <th>{{#str}}emoticoncomponent, admin{{/str}}</th>
+ <th colspan="2">{{#str}}emoticonalt, admin{{/str}}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#emoticons}}
+ <tr>
+ {{#fields}}
+ <td class="c{{index}}">
+ <input type="text" name="{{name}}[{{field}}]" class="form-text text-ltr" value="{{value}}">
+ </td>
+ {{/fields}}
+ <td>
+ {{#icon}}
+ {{>core/pix_icon}}
+ {{/icon}}
+ </td>
+ </tr>
+ {{/emoticons}}
+ </tbody>
+ </table>
+</div>
+<div>
+ <a href="{{reseturl}}">{{#str}}emoticonsreset, admin{{/str}}</a>
+</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_flag
+
+ Admin flag setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * value - form element value
+ * checked - is it checked
+ * id - element id
+ * label - element label
+
+ Example context (json):
+ {
+ "name": "test",
+ "id": "test0",
+ "checked": true,
+ "label": "Do you like crackers?"
+ }
+}}
+<input type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
+<label for="{{id}}">{{label}}</label>
--- /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_gradecat_combo
+
+ Admin gradecat_combo setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - element id
+ * options - list of options containing name, value and selected
+ * forced - is it forced
+ * advanced - is it advanced
+
+ Example context (json):
+ {
+ "name": "test",
+ "id": "test0",
+ "options": [
+ { "name": "Option name", "value": "Value", "selected": true }
+ ],
+ "forced": true,
+ "advanced": true
+ }
+}}
+<div class="form-group">
+ <select id="{{id}}" name="{{name}}[value]" class="form-select">
+ {{#options}}
+ <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
+ {{/options}}
+ </select>
+ <input type="checkbox" id="{{id}}force" name="{{name}}[forced]" value="1" {{#forced}}checked{{/forced}}>
+ <label for="{{id}}force">{{#str}}force{{/str}}</label>
+ <input type="checkbox" id="{{id}}adv" name="{{name}}[adv]" value="1" {{#advanced}}checked{{/advanced}}>
+ <label for="{{id}}adv">{{#str}}advanced{{/str}}</label>
+</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_heading
+
+ Admin heading setting template.
+
+ Context variables required for this template:
+ * title - Title text
+ * description - Description containing descriptionformatted
+
+ Example context (json):
+ {
+ "title": "Favourite cheeses",
+ "description": true,
+ "descriptionformatted": "Stilton, Cheddar, Edam"
+ }
+}}
+{{#title}}
+ <h3 class="main">{{title}}</h3>
+{{/title}}
+{{#description}}
+ <div class="box generalbox formsettingheading">{{{descriptionformatted}}}</div>
+{{/description}}
--- /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_special_calendar_weekend
+
+ Admin special_calendar_weekend setting template.
+
+ Context variables required for this template:
+ * name - form element name
+ * id - form element id
+ * days - list of days containing index, label, checked
+
+ Example context (json):
+ {
+ "name": "test",
+ "id": "i1",
+ "days": [
+ { "index": 0, "label": "Monday", "checked": true },
+ { "index": 0, "label": "Tuesday", "checked": false }
+ ]
+ }
+}}
+<table>
+ <thead>
+ <tr>
+ <input type="hidden" name="{{name}}[xxxxx]" value="1">
+ {{#days}}
+ <td>
+ <label for="{{id}}{{index}}">{{label}}</label>
+ </td>
+ {{/days}}
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ {{#days}}
+ <td>
+ <input type="checkbox" class="form-checkbox" id="{{id}}{{index}}" name="{{name}}[]" value="{{index}}" {{#checked}}checked{{/checked}}>
+ </td>
+ {{/days}}
+ </tr>
+ </tbody>
+</table>
--- /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/settings
+
+ Admin settings form template.
+
+ Context variables required for this template:
+ * actionurl - url to submit to
+ * params - list of parameters containing name and value
+ * return - page to return to
+ * title - form title
+ * settings - raw html for settings
+ * showsave - true if we need save buttons
+
+ Example context (json):
+ {
+ "actionurl": "/",
+ "return": "/",
+ "title": "Settings Form",
+ "settings": "RAW HTML",
+ "showsave": true
+ }
+}}
+<form action="{{actionurl}}" method="post" id="adminsettings">
+ <div class="settingsform clearfix">
+ {{#params}}
+ <input type="hidden" name="{{name}}" value="{{value}}">
+ {{/params}}
+ <input type="hidden" name="sesskey" value="{{sesskey}}">
+ <input type="hidden" name="return" value="{{return}}">
+ {{>core/prevent_form_autofill_password}}
+ {{#title}}
+ <h2>{{title}}</h2>
+ {{/title}}
+ {{{settings}}}
+ {{#showsave}}
+ <div class="form-buttons">
+ <input type="submit" class="form-submit" value={{#quote}}{{#str}}savechanges, admin{{/str}}{{/quote}}>
+ </div>
+ {{/showsave}}
+ </div>
+</form>
--- /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/settings_search_results
+
+ Admin setting search results template.
+
+ Context variables required for this template:
+ * actionurl - Url to post to
+ * hasresults - True if there are results
+ * results - List of results containing url, title, settings (array of raw html)
+ * showsave - Show save buttons
+
+ Example context (json):
+ {
+ "actionurl": "/",
+ "hasresults": true,
+ "results": [
+ { "url": "/", "title": "Match!", "settings": [ "blah blah blah" ] }
+ ]
+ }
+}}
+<form action="{{actionurl}}" method="post" id="adminsettings">
+ <div>
+ <input type="hidden" name="sesskey" value="{{sesskey}}">
+ {{>core/prevent_form_autofill_password}}
+ </div>
+ <fieldset>
+ <div class="clearer"></div>
+ {{#hasresults}}
+ {{#results}}
+ <h2 class="main">{{#str}}searchresults, admin{{/str}} - <a href="{{url}}">{{{title}}}</a></h2>
+ <fieldset class="adminsettings">
+ {{#settings}}
+ <div class="clearer"></div>
+ {{{.}}}
+ {{/settings}}
+ </fieldset>
+ {{/results}}
+ {{#showsave}}
+ <div class="form-buttons">
+ <input type="submit" class="form-submit" value={{#quote}}{{#str}}savechanges, admin{{/str}}{{/quote}}>
+ </div>
+ {{/showsave}}
+ {{/hasresults}}
+ {{^hasresults}}
+ {{#str}}noresults, admin{{/str}}
+ {{/hasresults}}
+ </fieldset>
+</form>
And I follow "Edit Test Outcome Grade Item 1"
And the field "Outcome" matches value "Grade outcome 1"
And I expand all fieldsets
- And "//div[contains(@class, 'fitem')]/div[contains(@class, 'fitemtitle')]/div[contains(@class, fstaticlabel) and contains(., 'Grade category')]/../../div[contains(@class, 'felement') and contains(., 'Grade category 1')]" "xpath_element" should exist
+ And I should see "Grade category 1" in the "Grade category" "form_row"
And I press "Cancel"
Scenario: Add a block
.path-admin-tool-lp .progress .bar {
min-width: 3em;
}
-.dir-rtl.path-admin-tool-lp .progress .bar {
- float: right;
-}
.path-admin-tool-lp [data-region="managecompetencies"] ul[data-enhance="tree"],
.path-admin-tool-lp [data-region="plans"] ul[data-enhance="tree"],
.path-admin-tool-lp [data-region="competencylinktree"] ul[data-enhance="linktree"],
margin-left: 10px;
}
-.dir-rtl.path-admin-tool-lp [data-region="managecompetencies"] .row-fluid [class*="span"] {
- float: right;
-}
-
.path-admin-tool-lp [data-region="link-buttons"],
.path-admin-tool-lp [data-region="move-buttons"] {
text-align: center;
height: 400px;
}
-.dir-rtl.path-admin-tool-lp [data-region="filtercompetencies"] input {
- margin-right: 10px;
-}
-
.path-admin-tool-lp span.currentdragtarget {
border: 1px dashed;
}
.path-admin-tool-lp [data-region="competencyruleconfig"] [data-region="rule-type"] label {
padding-right: 10px;
}
-.dir-rtl.path-admin-tool-lp [data-region="competencyruleconfig"] [data-region="rule-outcome"] label,
-.dir-rtl.path-admin-tool-lp [data-region="competencyruleconfig"] [data-region="rule-type"] label {
- padding-left: 10px;
- padding-right: 0;
-}
.path-admin-tool-lp [data-region="competencyruleconfig"] [data-region="rule-outcome"] label,
.path-admin-tool-lp [data-region="competencyruleconfig"] [data-region="rule-outcome"] select,
.path-admin-tool-lp [data-region="competencyruleconfig"] [data-region="rule-type"] label,
margin-left: -120px;
}
-.dir-rtl .tool-lp-menu.tool-lp-menu-open-left .tool-lp-sub-menu {
- margin-left: 0px;
- margin-right: -120px;
-}
-
/** This highlighting is copied from bootstrap - but can be overridden by a theme */
.tool-lp-menu .tool-lp-sub-menu .menu-focus a {
color: #fff ;
max-width: 100%;
box-sizing: border-box;
}
-
-/** Broader RTL changes */
-.dir-rtl.path-admin-tool-lp .pull-left {
- float: right;
-}
-.dir-rtl.path-admin-tool-lp .pull-right {
- float: left;
-}
-.dir-rtl.path-admin-tool-lp dd {
- margin-right: 10px;
-}
-.dir-rtl.path-admin-tool-lp ul.inline {
- margin-right: 0;
-}
$editlink = $this->render(new pix_icon('t/locked', get_string('scheduledtaskchangesdisabled', 'tool_task')));
}
- $namecell = new html_table_cell($task->get_name() . "\n" . html_writer::tag('span', '\\'.get_class($task), array('class' => 'task-class')));
+ $namecell = new html_table_cell($task->get_name() . "\n" . html_writer::tag('span', '\\'.get_class($task),
+ array('class' => 'task-class text-ltr')));
$namecell->header = true;
$component = $task->get_component();
new html_table_cell($task->get_fail_delay()),
new html_table_cell($customised)));
+ // Cron-style values must always be LTR.
+ $row->cells[5]->attributes['class'] = 'text-ltr';
+ $row->cells[6]->attributes['class'] = 'text-ltr';
+ $row->cells[7]->attributes['class'] = 'text-ltr';
+ $row->cells[8]->attributes['class'] = 'text-ltr';
+ $row->cells[9]->attributes['class'] = 'text-ltr';
+
if ($disabled) {
$row->attributes['class'] = 'disabled';
}
color: #888;
font-size: 0.75em;
}
+
+#page-admin-tool-task-scheduledtasks input[type=text] {
+ /*rtl:ignore*/
+ direction: ltr;
+}
$mform->addRule('username', get_string('requiredtemplate', 'tool_uploaduser'), 'required', null, 'client');
$mform->disabledIf('username', 'uutype', 'eq', UU_USER_ADD_UPDATE);
$mform->disabledIf('username', 'uutype', 'eq', UU_USER_UPDATE);
+ $mform->setForceLtr('username');
$mform->addElement('text', 'email', get_string('email'), 'maxlength="100" size="30"');
$mform->setType('email', PARAM_RAW); // No cleaning here. The process verifies it later.
$mform->disabledIf('email', 'uutype', 'eq', UU_USER_ADD_UPDATE);
$mform->disabledIf('email', 'uutype', 'eq', UU_USER_UPDATE);
+ $mform->setForceLtr('email');
// only enabled and known to work plugins
$choices = uu_supported_auths();
$mform->addElement('text', 'idnumber', get_string('idnumber'), 'maxlength="255" size="25"');
$mform->setType('idnumber', PARAM_NOTAGS);
+ $mform->setForceLtr('idnumber');
$mform->addElement('text', 'institution', get_string('institution'), 'maxlength="255" size="25"');
$mform->setType('institution', PARAM_TEXT);
$mform->addElement('text', 'phone1', get_string('phone1'), 'maxlength="20" size="25"');
$mform->setType('phone1', PARAM_NOTAGS);
$mform->setAdvanced('phone1');
+ $mform->setForceLtr('phone1');
$mform->addElement('text', 'phone2', get_string('phone2'), 'maxlength="20" size="25"');
$mform->setType('phone2', PARAM_NOTAGS);
$mform->setAdvanced('phone2');
+ $mform->setForceLtr('phone2');
$mform->addElement('text', 'address', get_string('address'), 'maxlength="255" size="25"');
$mform->setType('address', PARAM_TEXT);
--- /dev/null
+This files describes API changes in /admin/*.
+
+=== 3.2 ===
+
+* Admin settings have been refined to better support right-to-left languages. In RTL,
+ most fields should not have their direction flipped, a URL, a path to a file, ...
+ are always displayed LTR. Most of the admin_setting classes will now prefer LTR.
+ If you must not force left-to-right, here are a few options:
+ * Call admin_setting::set_force_ltr(false) on your setting;
+ * Use the php class admin_setting_localisedtext for text inputs;
+ * Use the php class admin_setting_localisedtextarea for larger text inputs.
--- /dev/null
+<?php
+// 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/>.
+
+/**
+ * Login renderable.
+ *
+ * @package core_auth
+ * @copyright 2016 Frédéric Massart - FMCorz.net
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+namespace core_auth\output;
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->libdir . '/externallib.php');
+
+use context_system;
+use help_icon;
+use moodle_url;
+use renderable;
+use renderer_base;
+use stdClass;
+use templatable;
+
+/**
+ * Login renderable class.
+ *
+ * @package core_auth
+ * @copyright 2016 Frédéric Massart - FMCorz.net
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+class login implements renderable, templatable {
+
+ /** @var bool Whether to auto focus the form fields. */
+ public $autofocusform;
+ /** @var bool Whether we can login as guest. */
+ public $canloginasguest;
+ /** @var bool Whether we can login by e-mail. */
+ public $canloginbyemail;
+ /** @var bool Whether we can sign-up. */
+ public $cansignup;
+ /** @var help_icon The cookies help icon. */
+ public $cookieshelpicon;
+ /** @var string The error message, if any. */
+ public $error;
+ /** @var moodle_url Forgot password URL. */
+ public $forgotpasswordurl;
+ /** @var array Additional identify providers, contains the keys 'url', 'name' and 'icon'. */
+ public $identityproviders;
+ /** @var string Login instructions, if any. */
+ public $instructions;
+ /** @var moodle_url The form action login URL. */
+ public $loginurl;
+ /** @var bool Whether the password can be auto completed. */
+ public $passwordautocomplete;
+ /** @var bool Whether the username should be remembered. */
+ public $rememberusername;
+ /** @var moodle_url The sign-up URL. */
+ public $signupurl;
+ /** @var string The user name to pre-fill the form with. */
+ public $username;
+
+ /**
+ * Constructor.
+ *
+ * @param array $authsequence The enabled sequence of authentication plugins.
+ * @param string $username The username to display.
+ */
+ public function __construct(array $authsequence, $username = '') {
+ global $CFG, $SESSION;
+
+ $this->username = $username;
+
+ $this->canloginasguest = $CFG->guestloginbutton and !isguestuser();
+ $this->canloginbyemail = !empty($CFG->authloginviaemail);
+ $this->cansignup = $CFG->registerauth == 'email' || !empty($CFG->registerauth);
+ $this->cookieshelpicon = new help_icon('cookiesenabled', 'core');
+
+ $this->autofocusform = !empty($CFG->loginpageautofocus);
+ $this->passwordautocomplete = !empty($CFG->loginpasswordautocomplete);
+ $this->rememberusername = isset($CFG->rememberusername) and $CFG->rememberusername == 2;
+
+ $this->forgotpasswordurl = new moodle_url($CFG->httpswwwroot . '/login/forgot_password.php');
+ $this->loginurl = new moodle_url($CFG->httpswwwroot . '/login/index.php');
+ $this->signupurl = new moodle_url('/login/signup.php');
+
+ // Authentication instructions.
+ $this->instructions = $CFG->auth_instructions;
+ if (is_enabled_auth('none')) {
+ $this->instructions = get_string('loginstepsnone');
+ } else if ($CFG->registerauth == 'email' && empty($this->instructions)) {
+ $this->instructions = get_string('loginsteps', 'core', 'signup.php');
+ }
+
+ // Identity providers.
+ $identityproviders = [];
+ foreach ($authsequence as $authname) {
+ $authplugin = get_auth_plugin($authname);
+ $identityproviders = array_merge($identityproviders, $authplugin->loginpage_idp_list($SESSION->wantsurl));
+ }
+ $this->identityproviders = $identityproviders;
+ }
+
+ /**
+ * Set the error message.
+ *
+ * @param string $error The error message.
+ */
+ public function set_error($error) {
+ $this->error = $error;
+ }
+
+ public function export_for_template(renderer_base $output) {
+ global $CFG;
+
+ $identityproviders = array_map(function($idp) use ($output) {
+ $idp['icon'] = $idp['icon']->export_for_template($output);
+ if ($idp['url'] instanceof moodle_url) {
+ $idp['url'] = $idp['url']->out(false);
+ }
+ return $idp;
+ }, $this->identityproviders);
+
+ $data = new stdClass();
+ $data->autofocusform = $this->autofocusform;
+ $data->canloginasguest = $this->canloginasguest;
+ $data->canloginbyemail = $this->canloginbyemail;
+ $data->cansignup = $this->cansignup;
+ $data->cookieshelpicon = $this->cookieshelpicon->export_for_template($output);
+ $data->error = $this->error;
+ $data->forgotpasswordurl = $this->forgotpasswordurl->out(false);
+ $data->hasidentityproviders = !empty($this->identityproviders);
+ $data->hasinstructions = !empty($this->instructions);
+ $data->identityproviders = $identityproviders;
+ list($data->instructions, $data->instructionsformat) = external_format_text($this->instructions, FORMAT_MOODLE,
+ context_system::instance()->id);
+ $data->loginurl = $this->loginurl->out(false);
+ $data->rememberusername = $this->rememberusername;
+ $data->passwordautocomplete = $this->passwordautocomplete;
+ $data->signupurl = $this->signupurl->out(false);
+
+ return $data;
+ }
+}
<tr valign="top" class="required">
<td align="right"><label for="host"><?php print_string("auth_dbhost_key", "auth_db") ?></label></td>
<td>
- <input id="host" name="host" type="text" size="30" value="<?php echo $config->host?>" />
+ <input id="host" name="host" type="text" class="text-ltr" size="30" value="<?php echo $config->host?>" />
<?php
if (isset($err["host"])) {
<tr valign="top" class="required">
<td align="right"><label for="name"><?php print_string("auth_dbname_key", "auth_db") ?></label></td>
<td>
- <input id="name" name="name" type="text" size="30" value="<?php echo $config->name?>" />
+ <input id="name" name="name" type="text" class="text-ltr" size="30" value="<?php echo $config->name?>" />
<?php
if (isset($err["name"])) {
<tr valign="top" class="required">
<td align="right"><label for="user"><?php print_string("auth_dbuser_key", "auth_db") ?></label></td>
<td>
- <input id="user" name="user" type="text" size="30" value="<?php echo $config->user?>" />
+ <input id="user" name="user" type="text" class="text-ltr" size="30" value="<?php echo $config->user?>" />
<?php
if (isset($err["user"])) {
<tr valign="top" class="required">
<td align="right"><label for="pass"><?php print_string("auth_dbpass_key", "auth_db") ?></label></td>
<td>
- <input id="pass" name="pass" type="password" size="30" value="<?php p($config->pass)?>" autocomplete="off"/>
+ <input id="pass" name="pass" type="password" class="text-ltr" size="30" value="<?php p($config->pass)?>" autocomplete="off"/>
<?php
if (isset($err["pass"])) {
<tr valign="top" class="required">
<td align="right"><label for="table"><?php print_string("auth_dbtable_key", "auth_db") ?></label></td>
<td>
- <input id="table" name="table" type="text" size="30" value="<?php echo $config->table?>" />
+ <input id="table" name="table" type="text" class="text-ltr" size="30" value="<?php echo $config->table?>" />
<?php
if (isset($err["table"])) {
<tr valign="top" class="required">
<td align="right"><label for="fielduser"><?php print_string("auth_dbfielduser_key", "auth_db") ?></label></td>
<td>
- <input id="fielduser" name="fielduser" type="text" size="30" value="<?php echo $config->fielduser?>" />
+ <input id="fielduser" name="fielduser" type="text" class="text-ltr" size="30" value="<?php echo $config->fielduser?>" />
<?php
if (isset($err["fielduser"])) {
<tr valign="top" class="required">
<td align="right"><label for="fieldpass"><?php print_string("auth_dbfieldpass_key", "auth_db") ?></label></td>
<td>
- <input id="fieldpass" name="fieldpass" type="text" size="30" value="<?php echo $config->fieldpass?>" />
+ <input id="fieldpass" name="fieldpass" type="text" class="text-ltr" size="30" value="<?php echo $config->fieldpass?>" />
<?php
if (isset($err["fieldpass"])) {
<tr valign="top" class="required">
<td align="right"><label for="extencoding"><?php print_string("auth_dbextencoding", "auth_db") ?></label></td>
<td>
- <input id="extencoding" name="extencoding" type="text" value="<?php echo $config->extencoding ?>" />
+ <input id="extencoding" name="extencoding" type="text" class="text-ltr" value="<?php echo $config->extencoding ?>" />
<?php
if (isset($err['extencoding'])) {
<tr valign="top">
<td align="right"><label for="setupsql"><?php print_string("auth_dbsetupsql", "auth_db") ?></label></td>
<td>
- <input id="setupsql" name="setupsql" type="text" value="<?php echo $config->setupsql ?>" />
+ <input id="setupsql" name="setupsql" type="text" class="text-ltr" value="<?php echo $config->setupsql ?>" />
</td>
<td><?php print_string('auth_dbsetupsqlhelp', 'auth_db') ?></td>
</tr>
<tr valign="top">
<td align="right"><label for="changepasswordurl"><?php print_string("auth_dbchangepasswordurl_key", "auth_db") ?></label></td>
<td>
- <input id="changepasswordurl" name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input id="changepasswordurl" name="changepasswordurl" type="text" class="text-ltr" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
<label for="host_url"><?php print_string('auth_ldap_host_url_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="host_url" id="host_url" type="text" size="30" value="<?php echo $config->host_url?>" />
+ <input name="host_url" id="host_url" type="text" class="text-ltr" size="30" value="<?php echo $config->host_url?>" />
<?php if (isset($err['host_url'])) { echo $OUTPUT->error_text($err['host_url']); } ?>
</td>
<td>
<label for="ldapencoding"><?php print_string('auth_ldap_ldap_encoding_key', 'auth_ldap') ?></label>
</td>
<td>
- <input id="ldapencoding" name="ldapencoding" type="text" value="<?php echo $config->ldapencoding ?>" />
+ <input id="ldapencoding" name="ldapencoding" type="text" class="text-ltr" value="<?php echo $config->ldapencoding ?>" />
<?php if (isset($err['ldapencoding'])) { echo $OUTPUT->error_text($err['ldapencoding']); } ?>
</td>
<td>
<label for="pagesize"><?php print_string('pagesize_key', 'auth_ldap') ?></label>
</td>
<td>
- <input id="pagesize" name="pagesize" type="text" value="<?php echo $config->pagesize ?>" <?php echo $disabled ?>/>
+ <input id="pagesize" name="pagesize" type="text" class="text-ltr" value="<?php echo $config->pagesize ?>" <?php echo $disabled ?>/>
<?php
if (isset($err['pagesize'])) { echo $OUTPUT->error_text($err['pagesize']); }
if ($disabled) {
<label for="bind_dn"><?php print_string('auth_ldap_bind_dn_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="bind_dn" id="bind_dn" type="text" size="30" value="<?php echo $config->bind_dn?>" />
+ <input name="bind_dn" id="bind_dn" type="text" class="text-ltr" size="30" value="<?php echo $config->bind_dn?>" />
<?php if (isset($err['bind_dn'])) { echo $OUTPUT->error_text($err['bind_dn']); } ?>
</td>
<td>
<label for="bind_pw"><?php print_string('auth_ldap_bind_pw_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="bind_pw" id="bind_pw" type="password" size="30" value="<?php echo $config->bind_pw?>" autocomplete="off"/>
+ <input name="bind_pw" id="bind_pw" type="password" class="text-ltr" size="30" value="<?php echo $config->bind_pw?>" autocomplete="off"/>
<?php if (isset($err['bind_pw'])) { echo $OUTPUT->error_text($err['bind_pw']); } ?>
</td>
<td>
<label for="contexts"><?php print_string('auth_ldap_contexts_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="contexts" id="contexts" type="text" size="30" value="<?php echo $config->contexts?>" />
+ <input name="contexts" id="contexts" type="text" class="text-ltr" size="30" value="<?php echo $config->contexts?>" />
<?php if (isset($err['contexts'])) { echo $OUTPUT->error_text($err['contexts']); } ?>
</td>
<td>
<label for="user_attribute"><?php print_string('auth_ldap_user_attribute_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="user_attribute" id="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute?>" />
+ <input name="user_attribute" id="user_attribute" type="text" class="text-ltr" size="30" value="<?php echo $config->user_attribute?>" />
<?php if (isset($err['user_attribute'])) { echo $OUTPUT->error_text($err['user_attribute']); } ?>
</td>
<td>
<label for="suspended_attribute"><?php print_string('auth_ldap_suspended_attribute_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="suspended_attribute" id="suspended_attribute" type="text" size="30" value="<?php echo $config->suspended_attribute?>" />
+ <input name="suspended_attribute" id="suspended_attribute" type="text" class="text-ltr" size="30" value="<?php echo $config->suspended_attribute?>" />
<?php if (isset($err['suspended_attribute'])) { echo $OUTPUT->error_text($err['suspended_attribute']); } ?>
</td>
<td>
<label for="memberattribute"><?php print_string('auth_ldap_memberattribute_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="memberattribute" id="memberattribute" type="text" size="30" value="<?php echo $config->memberattribute?>" />
+ <input name="memberattribute" id="memberattribute" type="text" class="text-ltr" size="30" value="<?php echo $config->memberattribute?>" />
<?php if (isset($err['memberattribute'])) { echo $OUTPUT->error_text($err['memberattribute']); } ?>
</td>
<td>
<label for="memberattribute_isdn"><?php print_string('auth_ldap_memberattribute_isdn_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="memberattribute_isdn" id="memberattribute_isdn" type="text" size="30" value="<?php echo $config->memberattribute_isdn?>" />
+ <input name="memberattribute_isdn" id="memberattribute_isdn" type="text" class="text-ltr" size="30" value="<?php echo $config->memberattribute_isdn?>" />
<?php if (isset($err['memberattribute_isdn'])) { echo $OUTPUT->error_text($err['memberattribute_isdn']); } ?>
</td>
<td>
<label for="objectclass"><?php print_string('auth_ldap_objectclass_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="objectclass" id="objectclass" type="text" size="30" value="<?php echo $config->objectclass?>" />
+ <input name="objectclass" id="objectclass" type="text" class="text-ltr" size="30" value="<?php echo $config->objectclass?>" />
<?php if (isset($err['objectclass'])) { echo $OUTPUT->error_text($err['objectclass']); } ?>
</td>
<td>
<label for="changepasswordurl"><?php print_string('auth_ldap_changepasswordurl_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" class="text-ltr" value="<?php echo $config->changepasswordurl ?>" />
<?php if (isset($err['changepasswordurl'])) { echo $OUTPUT->error_text($err['changepasswordurl']); } ?>
</td>
<td>
<label for="expiration_warning"><?php print_string('auth_ldap_expiration_warning_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="expiration_warning" id="expiration_warning" type="text" size="2" value="<?php echo $config->expiration_warning?>" />
+ <input name="expiration_warning" id="expiration_warning" type="text" class="text-ltr" size="2" value="<?php echo $config->expiration_warning?>" />
<?php if (isset($err['expiration_warning'])) { echo $OUTPUT->error_text($err['expiration_warning']); } ?>
</td>
<td>
<label for="expireattr"><?php print_string('auth_ldap_expireattr_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="expireattr" id="expireattr" type="text" size="30" value="<?php echo $config->expireattr?>" />
+ <input name="expireattr" id="expireattr" type="text" class="text-ltr" size="30" value="<?php echo $config->expireattr?>" />
<?php if (isset($err['expireattr'])) { echo $OUTPUT->error_text($err['expireattr']); } ?>
</td>
<td>
<label for="graceattr"><?php print_string('auth_ldap_gracelogin_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="graceattr" id="graceattr" type="text" size="30" value="<?php echo $config->graceattr?>" />
+ <input name="graceattr" id="graceattr" type="text" class="text-ltr" size="30" value="<?php echo $config->graceattr?>" />
<?php if (isset($err['graceattr'])) { echo $OUTPUT->error_text($err['graceattr']); } ?>
</td>
<td>
<label for="create_context"><?php print_string('auth_ldap_create_context_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="create_context" id="create_context" type="text" size="30" value="<?php echo $config->create_context?>" />
+ <input name="create_context" id="create_context" type="text" class="text-ltr" size="30" value="<?php echo $config->create_context?>" />
<?php if (isset($err['create_context'])) { echo $OUTPUT->error_text($err['create_context']); } ?>
</td>
<td>
<label for="creators"><?php print_string('auth_ldap_creators_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="creators" id="creators" type="text" size="30" value="<?php echo $config->creators?>" />
+ <input name="creators" id="creators" type="text" class="text-ltr" size="30" value="<?php echo $config->creators?>" />
<?php if (isset($err['creators'])) { echo $OUTPUT->error_text($err['creators']); } ?>
</td>
<td>
<label for="ntlmsso_subnet"><?php print_string('auth_ntlmsso_subnet_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="ntlmsso_subnet" id="ntlmsso_subnet" type="text" size="30" value="<?php p($config->ntlmsso_subnet) ?>" />
+ <input name="ntlmsso_subnet" id="ntlmsso_subnet" type="text" class="text-ltr" size="30" value="<?php p($config->ntlmsso_subnet) ?>" />
</td>
<td>
<?php print_string('auth_ntlmsso_subnet', 'auth_ldap') ?>
<label for="ntlmsso_remoteuserformat"><?php print_string('auth_ntlmsso_remoteuserformat_key', 'auth_ldap') ?></label>
</td>
<td>
- <input name="ntlmsso_remoteuserformat" id="ntlmsso_remoteuserformat" type="text" size="30" value="<?php echo $config->ntlmsso_remoteuserformat?>" />
+ <input name="ntlmsso_remoteuserformat" id="ntlmsso_remoteuserformat" type="text" class="text-ltr" size="30" value="<?php echo $config->ntlmsso_remoteuserformat?>" />
<?php if (isset($err['ntlmsso_remoteuserformat'])) { echo $OUTPUT->error_text($err['ntlmsso_remoteuserformat']); } ?>
</td>
<td>
// Add event handlers (first time only).
if (!M.availability_completion.form.addedEvents) {
M.availability_completion.form.addedEvents = true;
- var root = Y.one('#fitem_id_availabilityconditionsjson');
+ var root = Y.one('.availability-field');
root.delegate('change', function() {
// Whichever dropdown changed, just update the form.
M.core_availability.form.update();
if (!M.availability_date.form.addedEvents) {
M.availability_date.form.addedEvents = true;
- var root = Y.one('#fitem_id_availabilityconditionsjson');
+ var root = Y.one('.availability-field');
root.delegate('change', function() {
// For the direction, just update the form fields.
M.core_availability.form.update();
if (!M.availability_grade.form.addedEvents) {
M.availability_grade.form.addedEvents = true;
- var root = Y.one('#fitem_id_availabilityconditionsjson');
+ var root = Y.one('.availability-field');
root.delegate('change', function() {
// For the grade item, just update the form fields.
M.core_availability.form.update();
// Add event handlers (first time only).
if (!M.availability_group.form.addedEvents) {
M.availability_group.form.addedEvents = true;
- var root = Y.one('#fitem_id_availabilityconditionsjson');
+ var root = Y.one('.availability-field');
root.delegate('change', function() {
// Just update the form fields.
M.core_availability.form.update();
// Add event handlers (first time only).
if (!M.availability_grouping.form.addedEvents) {
M.availability_grouping.form.addedEvents = true;
- var root = Y.one('#fitem_id_availabilityconditionsjson');
+ var root = Y.one('.availability-field');
root.delegate('change', function() {
// Just update the form fields.
M.core_availability.form.update();
ancestorNode.one('input[name=value]').set('disabled', novalue);
M.core_availability.form.update();
};
- var root = Y.one('#fitem_id_availabilityconditionsjson');
+ var root = Y.one('.availability-field');
root.delegate('change', function() {
updateForm(this);
}, '.availability_profile select');
"base",
"node",
"event",
+ "event-delegate",
"panel",
"moodle-core-notification-dialogue",
"json"
And I press "Enable access"
And I press "Continue"
And I click on "Admin User" "link"
- And I follow "Profile" in the open menu
+ And I choose "Profile" in the open action menu
And I follow "Edit profile"
And I expand all fieldsets
And I set the field "Phone" to "123456789"
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager
And I press "Create badge"
And I set the field "type" to "Course completion"
- And I set the field with xpath "//fieldset/input[1]" to "0"
+ And I set the field with xpath ".//*[contains(., 'Minimum grade required')]/ancestor::*[contains(concat(' ', @class, ' '), ' fitem ')]//input[1]" to "0"
And I press "Save"
And I press "Enable access"
When I press "Continue"
-.block_activity_results {text-align: center;}
.block_activity_results h1 {margin: 4px;font-size: 1.1em;}
.block_activity_results table.grades {text-align: left; width: 100%;}
.block_activity_results table.grades .number{text-align: left; width:10%;}
.block_activity_results table.grades .name{text-align: left; width:77%;}
.block_activity_results table.grades .grade {text-align: right;}
.block_activity_results table.grades caption {font-weight: bold; font-size: 18px;}
-
-.dir-rtl .block_activity_results table.grades {text-align: right;}
-.dir-rtl .block_activity_results table.grades .number{text-align: right;}
-.dir-rtl .block_activity_results table.grades .name{text-align: right;}
// Using xpath liternal to avoid possible problems with comments containing quotes.
$commentliteral = behat_context_helper::escape($comment);
- $commentxpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' block_comments ')]" .
+ $commentxpath = "//*[contains(concat(' ', normalize-space(@class), ' '), ' block_comments ')]" .
"/descendant::div[@class='comment-message'][contains(., $commentliteral)]";
$commentnode = $this->find('xpath', $commentxpath, $exception);
text-align: right;
}
-.dir-rtl .block_course_overview .categorypath{
- text-align: left;
-}
-
.block_course_overview .content {
margin: 0 20px;
}
.block_course_overview .profilepicture {
float: left;
}
-.dir-rtl.block_course_overview .profilepicture {
- float:right;
-}
.block_course_overview .welcome_area {
width: 100%;
padding-bottom: 5px;
border-collapse: separate;
clear: none;
}
-.dir-rtl .block_course_overview .welcome_message {
- float:right;
-}
.block_course_overview .content h2.title {
float: left;
margin: 0 0 .5em 0;
position: relative;
}
-.dir-rtl .block_course_overview .content h2.title {
- float:right;
-}
.block_course_overview .course_title {
position: relative;
float: left;
padding: 2px 10px 0 0;
}
-.dir-rtl.editing .block_course_overview .move {
- float:right;
- padding: 2px 10px;
-}
.block_course_overview .course_list {
width: 100%;
.block_course_overview .activity_info {
clear: both;
}
-.dir-rtl .block_course_overview .activity_info {
- margin-right: 25px;
-}
.block_course_overview .activity_overview {
padding: 2px;
}
.block_course_overview .activity_overview img.iconlarge { vertical-align: text-bottom; margin-right: 6px; }
-.dir-rtl .block_course_overview .activity_overview img.iconlarge { margin-left: 6px; margin-right: 0;}
.block_course_overview .singleselect {
text-align: left;
margin: 0;
}
-.dir-rtl .block_course_overview .singleselect {
- text-align: right;
-}
.block_course_overview .content .course_list .movehere{
margin-bottom: 15px;
And I turn editing mode on
Then I should see "Proved the course summary block works!" in the "Course summary" "block"
And I should see "Course summary" in the "Course summary" "block"
- And I click on "Edit" "link" in the "Course summary" "block"
+ And I click on ".editbutton a" "css_element" in the "Course summary" "block"
Then I should see "Edit course settings" in the "h2" "css_element"
Scenario: Teacher can not see edit icon when edit mode is off
And I follow "Turn editing on"
Then I should see "Proved the summary block works!" in the "Course/site summary" "block"
And I should not see "Course summary" in the "Course/site summary" "block"
- And I click on "Edit" "link" in the "Course/site summary" "block"
+ And I click on ".editbutton a" "css_element" in the "Course/site summary" "block"
Then I should see "Front page settings" in the "h2" "css_element"
Scenario: Admin can not see edit icon when edit mode is off
.block_messages .content .list li.listentry .message {float:right;}
.block_messages .content .info {text-align:center;}
.block_messages .content .footer {clear:both;}
-
-.dir-rtl .block_messages .content .list li.listentry .user {float:right;}
-.dir-rtl .block_messages .content .list li.listentry .message {float:left;}
\ No newline at end of file