weekly release 4.0dev
[moodle.git] / report / upgrade.txt
CommitLineData
e30cc24c
PS
1This files describes API changes in /report/* - plugins,
2information provided here is intended especially for developers.
3
605354de 4=== 3.6 ===
5
6* The final deprecation of xxx_delete_course callback means that this function will no longer be called.
7 Please use the observer for event \core\event\course_content_deleted instead.
8
8fef061d
MG
9=== 3.2 ===
10* Callback delete_course is deprecated and should be replaced with observer for event \core\event\course_content_deleted
6cf5e0f2
SL
11* The report_log_print_graph signature and behaviour has changed to generate charts using
12 the new Chart API. The third argument has been renamed to $typeormode and it accepts
13 the type (usercourse.png, userday.png) or the mode (today, all).
8fef061d 14
e2cb3ffa
MG
15=== 2.7 ===
16* How to migrate reports accessing table 'log':
17 http://docs.moodle.org/dev/Migrating_log_access_in_reports
16e59c6a
AA
18* All reports that use logstores must implement a callback report_reportname_supports_logstore($storeinstance) in lib.php of the
19 report. Refer MDL-44596 for details.
e30cc24c
PS
20
21=== 2.2 ===
22
23API changes:
24* reports were moved from /admin/report/ to /report/
25* new support for report settings
26
27
c2dbe006
PS
28How to migrate existing admin reports:
29# move all files to new /report/yourplugin/ location
e30cc24c
PS
30# if settings.php exists add $settings=null;
31# if settings.php does not exist create it and link the report, index.php is not linked automatically any more
32# update require('../../config.php'); - remove one ../
c2dbe006 33# update all others includes and requires
e30cc24c 34# update all links to report pages by removing /admin/ or /$CFG->admin/
c2dbe006
PS
35# add language pack with at least 'pluginname' string
36# update CSS selectors
e30cc24c 37
c2dbe006
PS
38How to migrate existing course reports (optional):
39# move all files to new /report/yourplugin/ location
40# update require('../../config.php'); - remove one ../
41# update all others includes and requires
42# update all links to report pages by removing /course/ part
43# update all language strings (use 'report_yourplugin' instead of 'coursereport_yourplugin') - use AMOS hints in commit message
44# update all capability names
45# grep the plugin codebase and look for any remaining 'coursereport' occurrences
46# add new navigation hooks in lib.php - ex: report_stats_extend_navigation_course(), report_stats_extend_navigation_user()
47# add new page types in lib.php
48# create db/install.php migration script - delete old settings and capabilities (see converted plugins for examples)
49# update CSS selectors
50
51See http://docs.moodle.org/dev/General_report_plugins for more details and explanation.