diff --git a/admin/tool/uploaduser/user_form.php b/admin/tool/uploaduser/user_form.php index ce32ea260d5..26876ce9995 100644 --- a/admin/tool/uploaduser/user_form.php +++ b/admin/tool/uploaduser/user_form.php @@ -250,7 +250,7 @@ class admin_uploaduser_form2 extends moodleform { $mform->setType('htmleditor', PARAM_INT); } - $mform->addElement('text', 'city', get_string('city'), 'maxlength="100" size="25"'); + $mform->addElement('text', 'city', get_string('city'), 'maxlength="120" size="25"'); $mform->setType('city', PARAM_TEXT); if (empty($CFG->defaultcity)) { $mform->setDefault('city', $templateuser->city); @@ -288,14 +288,14 @@ class admin_uploaduser_form2 extends moodleform { $mform->setType('url', PARAM_URL); $mform->setAdvanced('url'); - $mform->addElement('text', 'idnumber', get_string('idnumber'), 'maxlength="64" size="25"'); + $mform->addElement('text', 'idnumber', get_string('idnumber'), 'maxlength="255" size="25"'); $mform->setType('idnumber', PARAM_NOTAGS); - $mform->addElement('text', 'institution', get_string('institution'), 'maxlength="40" size="25"'); + $mform->addElement('text', 'institution', get_string('institution'), 'maxlength="255" size="25"'); $mform->setType('institution', PARAM_TEXT); $mform->setDefault('institution', $templateuser->institution); - $mform->addElement('text', 'department', get_string('department'), 'maxlength="30" size="25"'); + $mform->addElement('text', 'department', get_string('department'), 'maxlength="255" size="25"'); $mform->setType('department', PARAM_TEXT); $mform->setDefault('department', $templateuser->department); @@ -307,7 +307,7 @@ class admin_uploaduser_form2 extends moodleform { $mform->setType('phone2', PARAM_NOTAGS); $mform->setAdvanced('phone2'); - $mform->addElement('text', 'address', get_string('address'), 'maxlength="70" size="25"'); + $mform->addElement('text', 'address', get_string('address'), 'maxlength="255" size="25"'); $mform->setType('address', PARAM_TEXT); $mform->setAdvanced('address'); diff --git a/lib/db/install.xml b/lib/db/install.xml index 8095faefeb2..d79981f92ad 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -765,9 +765,9 @@ - - - + + + @@ -3013,4 +3013,4 @@ - + \ No newline at end of file diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 1fad3d41432..543d1b3dd68 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2424,5 +2424,31 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2013091000.03); } + if ($oldversion < 2013091300.01) { + + $table = new xmldb_table('user'); + + // Changing precision of field institution on table user to (255). + $field = new xmldb_field('institution', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'phone2'); + + // Launch change of precision for field institution. + $dbman->change_field_precision($table, $field); + + // Changing precision of field department on table user to (255). + $field = new xmldb_field('department', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'institution'); + + // Launch change of precision for field department. + $dbman->change_field_precision($table, $field); + + // Changing precision of field address on table user to (255). + $field = new xmldb_field('address', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'department'); + + // Launch change of precision for field address. + $dbman->change_field_precision($table, $field); + + // Main savepoint reached. + upgrade_main_savepoint(true, 2013091300.01); + } + return true; } diff --git a/user/editlib.php b/user/editlib.php index 32a4634532f..158b01df379 100644 --- a/user/editlib.php +++ b/user/editlib.php @@ -347,10 +347,10 @@ function useredit_shared_definition(&$mform, $editoroptions = null, $filemanager $mform->addElement('text', 'idnumber', get_string('idnumber'), 'maxlength="255" size="25"'); $mform->setType('idnumber', PARAM_NOTAGS); - $mform->addElement('text', 'institution', get_string('institution'), 'maxlength="40" size="25"'); + $mform->addElement('text', 'institution', get_string('institution'), 'maxlength="255" size="25"'); $mform->setType('institution', PARAM_TEXT); - $mform->addElement('text', 'department', get_string('department'), 'maxlength="30" size="25"'); + $mform->addElement('text', 'department', get_string('department'), 'maxlength="255" size="25"'); $mform->setType('department', PARAM_TEXT); $mform->addElement('text', 'phone1', get_string('phone'), 'maxlength="20" size="25"'); @@ -359,7 +359,7 @@ function useredit_shared_definition(&$mform, $editoroptions = null, $filemanager $mform->addElement('text', 'phone2', get_string('phone2'), 'maxlength="20" size="25"'); $mform->setType('phone2', PARAM_NOTAGS); - $mform->addElement('text', 'address', get_string('address'), 'maxlength="70" size="25"'); + $mform->addElement('text', 'address', get_string('address'), 'maxlength="255" size="25"'); $mform->setType('address', PARAM_TEXT); diff --git a/version.php b/version.php index 31357b811d5..c9cd6f45a51 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2013091300.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2013091300.01; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes.