Merge branch 'MDL-42392-master' of git://github.com/andrewnicols/moodle
[moodle.git] / enrol / upgrade.txt
blobdc6d2c09f765c3702e8186a5cbf483554349ac32
1 This files describes API changes in /enrol/* - plugins,
2 information provided here is intended especially for developers.
4 === 2.6 ===
6 * Enrolment plugin which supports self enrolment should implement can_self_enrol()
7 * Enrolment plugin should implement get_enrol_info() to expose instance information
8   with webservice or external interface.
9 * Webservice core_enrol_get_enrolled_users_with_capability was incorrectly specifing
10   float as the return type for user id. int is the actual returned type and is now
11   reported as such.
13 === 2.5 ===
15 * plugins may use general enrol/editenrolment.php page to let users edit
16   enrolments manually
17 * new support for grade recovery in enrol_plugin::enrol_user() method
19 === 2.4 ===
21 required changes in code:
22 * use role_get_name() or role_fix_names() if you need any role names, using role.name
23   directly from database is not correct any more
24 * new restore support: ENROL_RESTORE_EXACT, ENROL_RESTORE_NOUSERS
25   and ENROL_RESTORE_CLASS were removed, implement new restore_* plugin methods instead
27 other changes and new features:
28 * course enrolment manager now works with disabled plugins too
29 * new support for protected group membership linked to enrol instance
30 * new support for expiry notifications - see enrol_plugin::send_expiry_notifications() method
33 === 2.2 ===
35 required changes in code:
36 * load_temp_role() is deprecated, use load_temp_course_role() instead, temp role not loaded
37 * remove_temp_role() is deprecated, use remove_temp_course_roles() instead
38 * 'user_unenrol_modified' event was renamed to 'user_enrol_modified'
41 === 2.0 ===
43 required changes in code:
44 * enrolment plugins need to be rewritten to use new API - see inline phpdocs and official plugins