mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
99c1543aa8
The API was incorrectly assuming that all uses of the API were for a course, and that the instanceid of the communication instance was a course id. These assumptions are both entirely wrong. The API is intended to support a range of uses including use at the site, user, and activity levels. Furthermore, if a group were to be used, then the instanceid should be of that group's id, and therefore the contextid would need to be fetched or that group's course instead. The only solution here is to add a new contextid field to the table, and implement it all parts of the API.