-
Bug
-
Resolution: Fixed
-
Minor
-
2.3.2, 2.3.5, 2.4.2, 2.5
-
MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
Moodle usually make use of a single row for related forms elements like in the examples I displayed in the attachments: example 1 and 2.
Why do the "Summary of section" is out of standards?
My suggestion is to change what I reported in current.png into expected.png.
The fix is trivial:
in HEAD/course/editsection_form.php
change
function definition() {
|
|
$mform = $this->_form;
|
$course = $this->_customdata['course'];
|
$mform->addElement('checkbox', 'usedefaultname', get_string('sectionusedefaultname'));
|
$mform->setDefault('usedefaultname', true);
|
|
$mform->addElement('text', 'name', get_string('sectionname'), array('size'=>'30'));
|
$mform->setType('name', PARAM_TEXT);
|
$mform->disabledIf('name','usedefaultname','checked');
|
|
/// Prepare course and the editor
|
|
$mform->addElement('editor', 'summary_editor', get_string('summary'), null, $this->_customdata['editoroptions']);
|
$mform->addHelpButton('summary_editor', 'summary');
|
$mform->setType('summary_editor', PARAM_RAW);
|
|
$mform->addElement('hidden', 'id');
|
$mform->setType('id', PARAM_INT);
|
|
$mform->_registerCancelButton('cancel');
|
}
|
to
function definition() {
|
|
$mform = $this->_form;
|
|
$course = $this->_customdata['course'];
|
|
$elementgroup = array();
|
$elementgroup[] = $mform->createElement('text', 'name', '', array('size'=>'30'));
|
$elementgroup[] = $mform->createElement('checkbox', 'usedefaultname', '', get_string('sectionusedefaultname'));
|
$mform->addGroup($elementgroup, 'name_group', get_string('sectionname'), ' ', false);
|
|
$mform->setDefault('usedefaultname', true);
|
$mform->setType('name', PARAM_TEXT);
|
$mform->disabledIf('name','usedefaultname','checked');
|
|
/// Prepare course and the editor
|
|
$mform->addElement('editor', 'summary_editor', get_string('summary'), null, $this->_customdata['editoroptions']);
|
$mform->addHelpButton('summary_editor', 'summary');
|
$mform->setType('summary_editor', PARAM_RAW);
|
|
$mform->addElement('hidden', 'id');
|
$mform->setType('id', PARAM_INT);
|
|
$mform->_registerCancelButton('cancel');
|
}
|