MDL-30403 improve upgrade docs for general reports
[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
4
5=== 2.2 ===
6
7API changes:
8* reports were moved from /admin/report/ to /report/
9* new support for report settings
10
11
c2dbe006
PS
12How to migrate existing admin reports:
13# move all files to new /report/yourplugin/ location
e30cc24c
PS
14# if settings.php exists add $settings=null;
15# if settings.php does not exist create it and link the report, index.php is not linked automatically any more
16# update require('../../config.php'); - remove one ../
c2dbe006 17# update all others includes and requires
e30cc24c 18# update all links to report pages by removing /admin/ or /$CFG->admin/
c2dbe006
PS
19# add language pack with at least 'pluginname' string
20# update CSS selectors
e30cc24c 21
c2dbe006
PS
22How to migrate existing course reports (optional):
23# move all files to new /report/yourplugin/ location
24# update require('../../config.php'); - remove one ../
25# update all others includes and requires
26# update all links to report pages by removing /course/ part
27# update all language strings (use 'report_yourplugin' instead of 'coursereport_yourplugin') - use AMOS hints in commit message
28# update all capability names
29# grep the plugin codebase and look for any remaining 'coursereport' occurrences
30# add new navigation hooks in lib.php - ex: report_stats_extend_navigation_course(), report_stats_extend_navigation_user()
31# add new page types in lib.php
32# create db/install.php migration script - delete old settings and capabilities (see converted plugins for examples)
33# update CSS selectors
34
35See http://docs.moodle.org/dev/General_report_plugins for more details and explanation.