When the autocomplete selection is updated, the content of the selection
wrapper is replaced with the new list of selected items. We must replace
only the content of the selection wrapper and not to nest it into
itself.
The add/roles thing was only converted to bootstrap 2/4 markup and the yui left in place.
The modal for adding users to a course was unsavable so I rewrote it with an mform in a popup, still calling
the same (barely) modified ajax script.
The webservice for searching cohorts was taken from admin/tool/lp and moved into /cohort. I added a generic "cohort"
mform element at the same time.
The webservice for searching for users was taken from the original ajax script.
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.
Stopped the keyboard navigation from completely deleting
list options when being deselected using keyboard navigation.
They are now returned to the list of available options to be
reselected.
Also remove the cross from the selected element when it is
a single select box.