Proyectos de Subversion Moodle

Rev

Ir a la última revisión | | Ultima modificación | Ver Log |

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