MDL-51324 forms: Add a new course selector
authorDamyon Wiese <damyon@moodle.com>
Fri, 4 Sep 2015 06:59:04 +0000 (14:59 +0800)
committerDamyon Wiese <damyon@moodle.com>
Wed, 9 Mar 2016 05:30:18 +0000 (13:30 +0800)
commit235ef57a3d3e9eb2a3e3ad37c9067127eb88aec3
treebbe68a3b661cc617f2ab43f49ea904c631524be9
parent9502c7f53974b7015796de7c01c4fcbb14c337d4
MDL-51324 forms: Add a new course selector

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
course/externallib.php
lib/amd/build/form-autocomplete.min.js
lib/amd/build/form-course-selector.min.js [new file with mode: 0644]
lib/amd/src/form-autocomplete.js
lib/amd/src/form-course-selector.js [new file with mode: 0644]
lib/coursecatlib.php
lib/datalib.php
lib/db/services.php
lib/form/course.php [new file with mode: 0644]
lib/formslib.php
lib/upgrade.txt