weekly release 3.0dev
[moodle.git] / enrol / upgrade.txt
CommitLineData
e922fe23
PS
1This files describes API changes in /enrol/* - plugins,
2information provided here is intended especially for developers.
3
6d28e2cf
JL
4=== 2.9 ===
5
6* External function core_enrol_external::get_users_courses now returns additional optional fields:
7 - summary: Course summary.
8 - summaryformat: Course summary format.
9 - format: Course format.
10 - showgrades: True if grades are shown, otherwise false.
11 - lang: Forced course language.
12 - enablecompletion: Control or not via completion and activity settings.
13
82f88cab
DP
14=== 2.8 ===
15
16* enrol_plugin::instance_deleteable() is deprecated and has been replaced by enrol_plugin::can_delete_instance()
b5a289c4
DNA
17* enrol_plugin::can_hide_show_instance() is a new function to control who can hide/show enrolment instances.
18 Returns true by default but plugins must implement their own logic.
82f88cab 19
38efca23
RT
20=== 2.6 ===
21
22* Enrolment plugin which supports self enrolment should implement can_self_enrol()
23* Enrolment plugin should implement get_enrol_info() to expose instance information
24 with webservice or external interface.
fb5ce7d3
DP
25* Webservice core_enrol_get_enrolled_users_with_capability was incorrectly specifing
26 float as the return type for user id. int is the actual returned type and is now
27 reported as such.
ee362526 28
59e7cc03
PS
29=== 2.5 ===
30
31* plugins may use general enrol/editenrolment.php page to let users edit
32 enrolments manually
ef8a733a 33* new support for grade recovery in enrol_plugin::enrol_user() method
59e7cc03 34
a2dd56d2
PS
35=== 2.4 ===
36
37required changes in code:
38* use role_get_name() or role_fix_names() if you need any role names, using role.name
39 directly from database is not correct any more
7a7b8a1f
PS
40* new restore support: ENROL_RESTORE_EXACT, ENROL_RESTORE_NOUSERS
41 and ENROL_RESTORE_CLASS were removed, implement new restore_* plugin methods instead
a2dd56d2 42
8c04252c 43other changes and new features:
005e57a2 44* course enrolment manager now works with disabled plugins too
8c04252c
PS
45* new support for protected group membership linked to enrol instance
46* new support for expiry notifications - see enrol_plugin::send_expiry_notifications() method
005e57a2 47
a2dd56d2 48
e922fe23
PS
49=== 2.2 ===
50
51required changes in code:
52* load_temp_role() is deprecated, use load_temp_course_role() instead, temp role not loaded
53* remove_temp_role() is deprecated, use remove_temp_course_roles() instead
358fb4dc 54* 'user_unenrol_modified' event was renamed to 'user_enrol_modified'
ee362526
PS
55
56
57=== 2.0 ===
58
59required changes in code:
ef8a733a 60* enrolment plugins need to be rewritten to use new API - see inline phpdocs and official plugins