mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-15262 Instead of removing these form fields entirely, rendering them as static form elements. Merging from MOODLE_19_STABLE
This commit is contained in:
parent
f7c0d84b87
commit
6e2eaae0e6
@ -88,21 +88,29 @@ class course_edit_form extends moodleform {
|
||||
$mform->setHelpButton('fullname', array('coursefullname', get_string('fullnamecourse')), true);
|
||||
$mform->addRule('fullname', get_string('missingfullname'), 'required', null, 'client');
|
||||
$mform->setType('fullname', PARAM_MULTILANG);
|
||||
$mform->setDefault('fullname', $fullname);
|
||||
} else {
|
||||
$mform->addElement('static','fullname', get_string('fullname'), $fullname);
|
||||
}
|
||||
|
||||
$mform->setDefault('fullname', $fullname);
|
||||
|
||||
if (has_capability('moodle/course:changeshortname', $coursecontext)) {
|
||||
$mform->addElement('text','shortname', get_string('shortnamecourse'),'maxlength="100" size="20"');
|
||||
$mform->setHelpButton('shortname', array('courseshortname', get_string('shortnamecourse')), true);
|
||||
$mform->addRule('shortname', get_string('missingshortname'), 'required', null, 'client');
|
||||
$mform->setType('shortname', PARAM_MULTILANG);
|
||||
$mform->setDefault('shortname', $shortname);
|
||||
} else {
|
||||
$mform->addElement('static','shortname', get_string('shortname'), get_string('defaultcourseshortname'));
|
||||
}
|
||||
|
||||
$mform->setDefault('shortname', get_string('defaultcourseshortname'));
|
||||
|
||||
if (has_capability('moodle/course:changeidnumber', $coursecontext)) {
|
||||
$mform->addElement('text','idnumber', get_string('idnumbercourse'),'maxlength="100" size="10"');
|
||||
$mform->setHelpButton('idnumber', array('courseidnumber', get_string('idnumbercourse')), true);
|
||||
$mform->setType('idnumber', PARAM_RAW);
|
||||
} else {
|
||||
$mform->addElement('static','idnumber', get_string('idnumber'));
|
||||
}
|
||||
|
||||
$mform->addElement('htmleditor','summary', get_string('summary'), array('rows'=> '10', 'cols'=>'65'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user