a8342dd5f5
The "Switch question bank" modal was attempting to load every question bank in the system the user has access to. For a highly privileged user, this could mean loading the coursemodinfo cache for every course in the system, resulting in memory exhaustion. This change updates the API for getting shared question banks so it can be searched by name and limited to a number of results. There is a new external service that uses this functionality, and a Javascript data provider for calling the service. The autocomplete in the "Switch question bank" modal will now use this data provider for the "Other question bank" autocomplete, rather than loading all banks up front.