Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-42270 course: Section name too big message.

  • Loading branch information...
commit bd0d739550d754da7a5b4c320c77d7ae9a3ca6f8 1 parent 75d8d06
@gjb2048 gjb2048 authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  course/editsection_form.php
View
3  course/editsection_form.php
@@ -22,9 +22,10 @@ function definition() {
$course = $this->_customdata['course'];
$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);

0 comments on commit bd0d739

Please sign in to comment.
Something went wrong with that request. Please try again.