Allows adding multiple instances of the meta enrol plugin at once.
I had to add support to the autocomplete element for filling the field from behat
when it was not using tags. I also had to make the shortnames more easily searchable
and unique in the behat feature file.
Incorrect types were preventing the currently selected values from
being removed from the new values returned via ajax.
Also fix a selection bug with autocomplete+ajax+singleselect.
This is a squashed commit containing a number of changes:
This is an ajax driven course selector that has searching etc. It can select single, or multiple courses.
Make course selector accept a list of courses to exclude
courseselector - lookup coursename on setValue
Use the get_course_display_name_in_list function to generate the course names
Add a throttle to auto-complete to reduce spamming the server
Do a single query to fetch all the courses in the mform element when validation fails
Fix core course search function to return results when there are less than 2 chars in the query.
Handle setData with an empty array in new course selector
Quickly navigating via the keyboard to an autocomplete
element and hitting down would result in the selections
being displayed and then quickly removed. This has now
been fixed.
Fixes 3 problems with deselecting items in an autocomplete field:
1. Keep track of whether items were in the offical suggestion list, or are newly created
tags and remove the "newly created tags" from the suggestion list when they are
deselected
2. Change the aria-role for the selected items list when items cannot be deselected (and
do not treat it like a multiselect list).
3. When leaving and returning focus to the selected items list, remember the last
active-descendant.