Small note about admin reports

Small note about admin reports

by Tim Hunt -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It has bugged me for a while that if you write a new admin report, you can't put the name of your report plugin in admin/report/myreport/lang/en_utf8/report_myreport.php. Instead it has to go in the main lang/en_utf8/admin.php lang file, otherwise the name won't show up in the main admin tree. That means that admin reports were not totally pluggable.

It has now bugged me so much that I filed and fixed MDL-11552. Now, you can put the lang string in the obvious place. In the example above, the string would have to be called 'myreport', in the lang file within the plugin. That is exactly the same name that the string in admin.php used to have. As a fallback, if the string is not found in report_myreport.php, the code reverts to looking in admin.php.
Average of ratings: Useful (1)