When editing text type customfields, the settings form does not correctly display the setting's state.
Steps to replicate (requires a test course created)
- Login as Admin
- Navigate to Site administration > Courses > Course custom fields
- Add a new category (default name should be Other fields)
- Click add a new custom field and select Short Text from the drop down
- In the settings form add a name and shortname for the field and under the subsection Short text field settings set the Maximum number of characters to 20
- Save the form
- Click on the Edit icon for the field you created to go back into settings
- The Maximum number of characters displays the default value of 1333, not the value you set of 20
- Navigate to the Edit settings test course and under the subsection of the category name you created (default is Other fields) change the value of your custom field to a string of length greater than 20 characters (but less than 1333)
- Try to save the settings, you should get an error message on the field displaying "The maximum number of characters allowed in this field is 20."
I have also checked the DB, clearly the value is saved, but the settings form for the custom field does not correctly display the set value.