This test requires admin access. If you would like to use the QA testing site for running it, please see the QA testing guide for details of how to request admin access. Begin just after the hourly reset to give yourself plenty of time to complete the test!
This is an exploratory test of a new feature, so please feel free to try anything you like and not just the test steps!
1. Log in as an admin and go to Site administration / Courses / Course custom fields
2. Click "Add a new category"
3. Confirm that a new category "Other fields" is added.
4. Try to rename this category.
5. Confirm that you can rename the category.
6. Refresh the page.
7. Confirm that the category name remains unchanged.
8. Click "Add a new custom field"
9. Confirm that the dropdown menu lists the following custom field types: Checkbox, Date and time, Dropdown menu, Short text, Text area
10. Add at least two for each custom field type to the category. Set various settings for each custom field.
11. Create another category and add each custom field types with various settings for each custom field.
12. Edit one or more courses.
13. Confirm that the custom categories and fields that you set up are shown as expected on the course edit form.
14. Confirm that the input behaviours for each custom field are consistent with their settings. Examples:
|An error will be shown indicating that the field is required when the custom field is left empty.
|If you have two courses c1 and c2 you cannot use the same value for a custom field that has already been defined on the other course
|If you are a teacher, you won't be able to edit the custom field. If you are a manager/admin, you should be able to.
15. Go to the site home.
16. Confirm that the custom fields that have been set are shown for each course listed in the site home according to their visibility settings. For example:
|Custom field value can be seen by everyone regardless of their role.
|Only users with the capability moodle/course:update (allowed for the default role of teacher) can view the custom field's value.
|The custom field's value won't be displayed at all
- Disable one or more custom field types in Site administration / Plugins / Custom fields / Manage custom field types.
- Backup a course.
- Restore the backup as a new course.
- Go to the site home.
- Confirm that the custom field values for the course are shown, except for the field types that have been disabled.
- Re-enable the disabled custom field types.
- Back on the site home, confirm that the custom field values are shown.
- Go to Site administration / Courses / Course custom fields.
- Delete one of the defined custom fields.
- Go to the site home.
- Confirm that the values for the deleted custom field are no longer shown.
- Make sure that global search is enabled, if necessary enabling global search using the simple DB engine.
- Index all of the site contents.
- Search a word that's in the value of a custom field.
- Confirm that the custom field comes up on the search results.