mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-38005-master' of git://github.com/FMCorz/moodle
This commit is contained in:
commit
7c211f565a
@ -51,7 +51,7 @@ class course_completion_form extends moodleform {
|
||||
|
||||
// Check if there is existing criteria completions
|
||||
if ($completion->is_course_locked()) {
|
||||
$mform->addElement('header', '', get_string('completionsettingslocked', 'completion'));
|
||||
$mform->addElement('header', 'completionsettingslocked', get_string('completionsettingslocked', 'completion'));
|
||||
$mform->addElement('static', '', '', get_string('err_settingslocked', 'completion'));
|
||||
$mform->addElement('submit', 'settingsunlock', get_string('unlockcompletiondelete', 'completion'));
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ class course_edit_form extends moodleform {
|
||||
enrol_course_edit_form($mform, $course, $context);
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
$mform->addElement('header','', get_string('groups', 'group'));
|
||||
$mform->addElement('header','groups', get_string('groups', 'group'));
|
||||
|
||||
$choices = array();
|
||||
$choices[NOGROUPS] = get_string('groupsnone', 'group');
|
||||
@ -219,7 +219,7 @@ class course_edit_form extends moodleform {
|
||||
$mform->addElement('select', 'defaultgroupingid', get_string('defaultgrouping', 'group'), $options);
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
$mform->addElement('header','', get_string('availability'));
|
||||
$mform->addElement('header','availability', get_string('availability'));
|
||||
|
||||
$choices = array();
|
||||
$choices['0'] = get_string('courseavailablenot');
|
||||
@ -237,7 +237,7 @@ class course_edit_form extends moodleform {
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
$mform->addElement('header','', get_string('language'));
|
||||
$mform->addElement('header','language', get_string('language'));
|
||||
|
||||
$languages=array();
|
||||
$languages[''] = get_string('forceno');
|
||||
@ -247,7 +247,7 @@ class course_edit_form extends moodleform {
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
if (completion_info::is_enabled_for_site()) {
|
||||
$mform->addElement('header','', get_string('progress','completion'));
|
||||
$mform->addElement('header','progress', get_string('progress','completion'));
|
||||
$mform->addElement('select', 'enablecompletion', get_string('completion','completion'),
|
||||
array(0=>get_string('completiondisabled','completion'), 1=>get_string('completionenabled','completion')));
|
||||
$mform->setDefault('enablecompletion', $courseconfig->enablecompletion);
|
||||
@ -314,7 +314,7 @@ class course_edit_form extends moodleform {
|
||||
$formatvalue = $mform->getElementValue('format');
|
||||
if (is_array($formatvalue) && !empty($formatvalue)) {
|
||||
$courseformat = course_get_format((object)array('format' => $formatvalue[0]));
|
||||
$newel = $mform->createElement('header', '', get_string('courseformatoptions', 'moodle',
|
||||
$newel = $mform->createElement('header', 'courseformatoptions', get_string('courseformatoptions', 'moodle',
|
||||
$courseformat->get_format_name()));
|
||||
$mform->insertElementBefore($newel, 'addcourseformatoptionshere');
|
||||
|
||||
|
@ -56,7 +56,7 @@ class editsection_form extends moodleform {
|
||||
$course = $this->_customdata['course'];
|
||||
|
||||
if (!empty($CFG->enableavailability)) {
|
||||
$mform->addElement('header', '', get_string('availabilityconditions', 'condition'));
|
||||
$mform->addElement('header', 'availabilityconditions', get_string('availabilityconditions', 'condition'));
|
||||
// String used by conditions more than once
|
||||
$strcondnone = get_string('none', 'condition');
|
||||
// Grouping conditions - only if grouping is enabled at site level
|
||||
|
@ -127,7 +127,7 @@ class enrol_authorize_form extends moodleform
|
||||
}
|
||||
|
||||
if ($plugin->get_config('an_avs')) {
|
||||
$mform->addElement('header', '', ' ' . get_string('address'), '');
|
||||
$mform->addElement('header', 'addressheader', ' ' . get_string('address'), '');
|
||||
|
||||
$mform->addElement('text', 'ccaddress', get_string('address'), 'size="30"');
|
||||
$mform->setType('ccaddress', PARAM_ALPHANUM);
|
||||
|
@ -1374,6 +1374,9 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
|
||||
* @return void
|
||||
*/
|
||||
function setExpanded($headername, $expanded=true){
|
||||
if (empty($headername)) {
|
||||
return;
|
||||
}
|
||||
$element = $this->getElement($headername);
|
||||
if ($element->getType() != 'header') {
|
||||
debugging('Cannot use setExpanded on non-header elements', DEBUG_DEVELOPER);
|
||||
|
@ -34,8 +34,9 @@ class login_change_password_form extends moodleform {
|
||||
global $USER, $CFG;
|
||||
|
||||
$mform = $this->_form;
|
||||
$mform->setDisableShortforms(true);
|
||||
|
||||
$mform->addElement('header', '', get_string('changepassword'), '');
|
||||
$mform->addElement('header', 'changepassword', get_string('changepassword'), '');
|
||||
|
||||
// visible elements
|
||||
$mform->addElement('static', 'username', get_string('username'), $USER->username);
|
||||
|
@ -32,8 +32,9 @@ class login_forgot_password_form extends moodleform {
|
||||
|
||||
function definition() {
|
||||
$mform = $this->_form;
|
||||
$mform->setDisableShortforms(true);
|
||||
|
||||
$mform->addElement('header', '', get_string('searchbyusername'), '');
|
||||
$mform->addElement('header', 'searchbyusername', get_string('searchbyusername'), '');
|
||||
|
||||
$mform->addElement('text', 'username', get_string('username'));
|
||||
$mform->setType('username', PARAM_RAW);
|
||||
@ -41,7 +42,7 @@ class login_forgot_password_form extends moodleform {
|
||||
$submitlabel = get_string('search');
|
||||
$mform->addElement('submit', 'submitbuttonusername', $submitlabel);
|
||||
|
||||
$mform->addElement('header', '', get_string('searchbyemail'), '');
|
||||
$mform->addElement('header', 'searchbyemail', get_string('searchbyemail'), '');
|
||||
|
||||
$mform->addElement('text', 'email', get_string('email'));
|
||||
$mform->setType('email', PARAM_RAW);
|
||||
|
@ -35,7 +35,7 @@ class login_signup_form extends moodleform {
|
||||
|
||||
$mform = $this->_form;
|
||||
|
||||
$mform->addElement('header', '', get_string('createuserandpass'), '');
|
||||
$mform->addElement('header', 'createuserandpass', get_string('createuserandpass'), '');
|
||||
|
||||
|
||||
$mform->addElement('text', 'username', get_string('username'), 'maxlength="100" size="12"');
|
||||
@ -49,7 +49,7 @@ class login_signup_form extends moodleform {
|
||||
$mform->setType('password', PARAM_RAW);
|
||||
$mform->addRule('password', get_string('missingpassword'), 'required', null, 'server');
|
||||
|
||||
$mform->addElement('header', '', get_string('supplyinfo'),'');
|
||||
$mform->addElement('header', 'supplyinfo', get_string('supplyinfo'),'');
|
||||
|
||||
$mform->addElement('text', 'email', get_string('email'), 'maxlength="100" size="25"');
|
||||
$mform->setType('email', PARAM_NOTAGS);
|
||||
@ -103,7 +103,8 @@ class login_signup_form extends moodleform {
|
||||
profile_signup_fields($mform);
|
||||
|
||||
if (!empty($CFG->sitepolicy)) {
|
||||
$mform->addElement('header', '', get_string('policyagreement'), '');
|
||||
$mform->addElement('header', 'policyagreement', get_string('policyagreement'), '');
|
||||
$mform->setExpanded('policyagreement');
|
||||
$mform->addElement('static', 'policylink', '', '<a href="'.$CFG->sitepolicy.'" onclick="this.target=\'_blank\'">'.get_String('policyagreementclick').'</a>');
|
||||
$mform->addElement('checkbox', 'policyagreed', get_string('policyaccept'));
|
||||
$mform->addRule('policyagreed', get_string('policyagree'), 'required', null, 'server');
|
||||
|
@ -44,7 +44,8 @@ class assignfeedback_file_batch_upload_files_form extends moodleform {
|
||||
$mform = $this->_form;
|
||||
$params = $this->_customdata;
|
||||
|
||||
$mform->addElement('header', '', get_string('batchuploadfilesforusers', 'assignfeedback_file', count($params['users'])));
|
||||
$mform->addElement('header', 'batchuploadfilesforusers', get_string('batchuploadfilesforusers', 'assignfeedback_file',
|
||||
count($params['users'])));
|
||||
$mform->addElement('static', 'userslist', get_string('selectedusers', 'assignfeedback_file'), $params['usershtml']);
|
||||
|
||||
$data = new stdClass();
|
||||
|
@ -43,7 +43,7 @@ class assignfeedback_file_upload_zip_form extends moodleform {
|
||||
$mform = $this->_form;
|
||||
$params = $this->_customdata;
|
||||
|
||||
$mform->addElement('header', '', get_string('uploadzip', 'assignfeedback_file'));
|
||||
$mform->addElement('header', 'uploadzip', get_string('uploadzip', 'assignfeedback_file'));
|
||||
|
||||
$fileoptions = array('subdirs'=>0,
|
||||
'maxbytes'=>$COURSE->maxbytes,
|
||||
|
@ -43,7 +43,7 @@ class assignfeedback_offline_upload_grades_form extends moodleform {
|
||||
$mform = $this->_form;
|
||||
$params = $this->_customdata;
|
||||
|
||||
$mform->addElement('header', '', get_string('uploadgrades', 'assignfeedback_offline'));
|
||||
$mform->addElement('header', 'uploadgrades', get_string('uploadgrades', 'assignfeedback_offline'));
|
||||
|
||||
$fileoptions = array('subdirs'=>0,
|
||||
'maxbytes'=>$COURSE->maxbytes,
|
||||
|
@ -83,7 +83,7 @@ class feedback_edit_use_template_form extends moodleform {
|
||||
|
||||
$elementgroup = array();
|
||||
//headline
|
||||
$mform->addElement('header', '', get_string('using_templates', 'feedback'));
|
||||
$mform->addElement('header', 'using_templates', get_string('using_templates', 'feedback'));
|
||||
// hidden elements
|
||||
$mform->addElement('hidden', 'id');
|
||||
$mform->setType('id', PARAM_INT);
|
||||
@ -164,7 +164,7 @@ class feedback_edit_create_template_form extends moodleform {
|
||||
$mform->setType('savetemplate', PARAM_INT);
|
||||
|
||||
//headline
|
||||
$mform->addElement('header', '', get_string('creating_templates', 'feedback'));
|
||||
$mform->addElement('header', 'creating_templates', get_string('creating_templates', 'feedback'));
|
||||
|
||||
// visible elements
|
||||
$elementgroup = array();
|
||||
|
@ -88,7 +88,7 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
|
||||
if ($CFG->enablerssfeeds && isset($CFG->forum_enablerssfeeds) && $CFG->forum_enablerssfeeds) {
|
||||
//-------------------------------------------------------------------------------
|
||||
$mform->addElement('header', '', get_string('rss'));
|
||||
$mform->addElement('header', 'rssheader', get_string('rss'));
|
||||
$choices = array();
|
||||
$choices[0] = get_string('none');
|
||||
$choices[1] = get_string('discussions', 'forum');
|
||||
@ -116,7 +116,7 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
$mform->addElement('header', '', get_string('blockafter', 'forum'));
|
||||
$mform->addElement('header', 'blockafterheader', get_string('blockafter', 'forum'));
|
||||
$options = array();
|
||||
$options[0] = get_string('blockperioddisabled','forum');
|
||||
$options[60*60*24] = '1 '.get_string('day');
|
||||
|
@ -119,7 +119,7 @@ class mod_forum_post_form extends moodleform {
|
||||
}
|
||||
|
||||
if (!empty($CFG->forum_enabletimedposts) && !$post->parent && has_capability('mod/forum:viewhiddentimedposts', $coursecontext)) { // hack alert
|
||||
$mform->addElement('header', '', get_string('displayperiod', 'forum'));
|
||||
$mform->addElement('header', 'displayperiod', get_string('displayperiod', 'forum'));
|
||||
|
||||
$mform->addElement('date_selector', 'timestart', get_string('displaystart', 'forum'), array('optional'=>true));
|
||||
$mform->addHelpButton('timestart', 'displaystart', 'forum');
|
||||
|
@ -103,7 +103,7 @@ class mod_glossary_mod_form extends moodleform_mod {
|
||||
|
||||
if ($CFG->enablerssfeeds && isset($CFG->glossary_enablerssfeeds) && $CFG->glossary_enablerssfeeds) {
|
||||
//-------------------------------------------------------------------------------
|
||||
$mform->addElement('header', '', get_string('rss'));
|
||||
$mform->addElement('header', 'rssheader', get_string('rss'));
|
||||
$choices = array();
|
||||
$choices[0] = get_string('none');
|
||||
$choices[1] = get_string('withauthor', 'glossary');
|
||||
|
@ -272,7 +272,7 @@ class question_dataset_dependent_items_form extends question_wizard_form {
|
||||
$k = optional_param('selectshow', 1, PARAM_INT);
|
||||
for ($i = $this->noofitems; $i >= 1; $i--) {
|
||||
if ($k > 0) {
|
||||
$mform->addElement('header', '', "<b>" .
|
||||
$mform->addElement('header', 'setnoheader', "<b>" .
|
||||
get_string('setno', 'qtype_calculated', $i)."</b> ");
|
||||
}
|
||||
foreach ($this->datasetdefs as $defkey => $datasetdef) {
|
||||
|
@ -291,7 +291,7 @@ class repository_equella extends repository {
|
||||
);
|
||||
$mform->addElement('select', 'equella_select_restriction', get_string('selectrestriction', 'repository_equella'), $choices);
|
||||
|
||||
$mform->addElement('header', '',
|
||||
$mform->addElement('header', 'groupheader',
|
||||
get_string('group', 'repository_equella', get_string('groupdefault', 'repository_equella')));
|
||||
$mform->addElement('text', 'equella_shareid', get_string('sharedid', 'repository_equella'));
|
||||
$mform->setType('equella_shareid', PARAM_RAW);
|
||||
@ -302,7 +302,8 @@ class repository_equella extends repository {
|
||||
$mform->addRule('equella_sharedsecret', $strrequired, 'required', null, 'client');
|
||||
|
||||
foreach (self::get_all_editing_roles() as $role) {
|
||||
$mform->addElement('header', '', get_string('group', 'repository_equella', format_string($role->name)));
|
||||
$mform->addElement('header', 'groupheader_'.$role->shortname, get_string('group', 'repository_equella',
|
||||
format_string($role->name)));
|
||||
$mform->addElement('text', "equella_{$role->shortname}_shareid", get_string('sharedid', 'repository_equella'));
|
||||
$mform->setType("equella_{$role->shortname}_shareid", PARAM_RAW);
|
||||
$mform->addElement('text', "equella_{$role->shortname}_sharedsecret",
|
||||
|
Loading…
x
Reference in New Issue
Block a user