MDL-81601 core_course: Add course index completion status behats
[moodle.git] / report / upgrade.txt
blob412e8e84496067947773fd1e45078a6a60d1981d
1 This files describes API changes in /report/* - plugins,
2 information provided here is intended especially for developers.
4 === 4.5 ===
6 * The previously deprecated `report_helper::save_selected_report` method has been removed
8 === 4.2 ===
10 * The method report_progress\local\helper::get_activities_to_show() has an additional parameter $activitysection
11   to support filtering by sections.
13 === 4.0 ===
15 * The method report_helper::save_selected_report() has been been deprecated because it is no longer used.
17 === 3.11 ===
19 * The new report plugin's can have drop down, which can be included by calling static
20   methods save_selected_report and print_report_selector in lib/classes/report_helper.php.
21   The save_selected_report helps to remember the most recently accessed report plugin.
22   print_report_selector would help to show the dropdown, on the report page. Make sure
23   to call print_report_selector after the header is printed/echoed.
25 === 3.6 ===
27 * The final deprecation of xxx_delete_course callback means that this function will no longer be called.
28   Please use the observer for event \core\event\course_content_deleted instead.
30 === 3.2 ===
31 * Callback delete_course is deprecated and should be replaced with observer for event \core\event\course_content_deleted
32 * The report_log_print_graph signature and behaviour has changed to generate charts using
33   the new Chart API. The third argument has been renamed to $typeormode and it accepts
34   the type (usercourse.png, userday.png) or the mode (today, all).
36 === 2.7 ===
37 * How to migrate reports accessing table 'log':
38   http://docs.moodle.org/dev/Migrating_log_access_in_reports
39 * All reports that use logstores must implement a callback report_reportname_supports_logstore($storeinstance) in lib.php of the
40   report. Refer MDL-44596 for details.
42 === 2.2 ===
44 API changes:
45 * reports were moved from /admin/report/ to /report/
46 * new support for report settings
49 How to migrate existing admin reports:
50 # move all files to new /report/yourplugin/ location
51 # if settings.php exists add $settings=null;
52 # if settings.php does not exist create it and link the report, index.php is not linked automatically any more
53 # update require('../../config.php'); - remove one ../
54 # update all others includes and requires
55 # update all links to report pages by removing /admin/ or /$CFG->admin/
56 # add language pack with at least 'pluginname' string
57 # update CSS selectors
59 How to migrate existing course reports (optional):
60 # move all files to new /report/yourplugin/ location
61 # update require('../../config.php'); - remove one ../
62 # update all others includes and requires
63 # update all links to report pages by removing /course/ part
64 # update all language strings (use 'report_yourplugin' instead of 'coursereport_yourplugin') - use AMOS hints in commit message
65 # update all capability names
66 # grep the plugin codebase and look for any remaining 'coursereport' occurrences
67 # add new navigation hooks in lib.php - ex: report_stats_extend_navigation_course(), report_stats_extend_navigation_user()
68 # add new page types in lib.php
69 # create db/install.php migration script - delete old settings and capabilities (see converted plugins for examples)
70 # update CSS selectors
72 See http://docs.moodle.org/dev/General_report_plugins for more details and explanation.