MDL-42270 course: Section name too big message.

This commit is contained in:
Gareth J Barnard 2013-10-24 22:47:13 +01:00
parent 68291f2d57
commit e2cceaffad

View File

@ -24,9 +24,10 @@ class editsection_form extends moodleform {
$mform->addElement('header', 'generalhdr', get_string('general'));
$elementgroup = array();
$elementgroup[] = $mform->createElement('text', 'name', '', array('size' => '30'));
$elementgroup[] = $mform->createElement('text', 'name', '', array('size' => '30', 'maxlength' => '255'));
$elementgroup[] = $mform->createElement('checkbox', 'usedefaultname', '', get_string('sectionusedefaultname'));
$mform->addGroup($elementgroup, 'name_group', get_string('sectionname'), ' ', false);
$mform->addGroupRule('name_group', array('name' => array(array(get_string('maximumchars', '', 255), 'maxlength', 255))));
$mform->setDefault('usedefaultname', true);
$mform->setType('name', PARAM_TEXT);