How do you write Course Reports in 2.3?

How do you write Course Reports in 2.3?

by Howard Miller -
Number of replies: 2
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
...and where do they show up now in the navigation?

It's clearly changed a lot but I can't find any documentation. The upgrade.txt file says...

"add new navigation hooks in lib.php - ex: report_stats_extend_navigation_course(), report_stats_extend_navigation_user()"

...and also...

"add new page types in lib.php"

...neither of which tell me very much. I've had a look in some existing ones and it doesn't make much sense. Can anybody help and/or point to the documentation I can't find.

Thanks!
Average of ratings: -
In reply to Howard Miller

Re: How do you write Course Reports in 2.3?

by Dan Poltawski -
Does this help at all:
http://docs.moodle.org/dev/Reports
In reply to Dan Poltawski

Re: How do you write Course Reports in 2.3?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Erm... yes. Thanks Dan.

The upgrade.txt file in Moodle points to this page: http://docs.moodle.org/dev/General_report_plugins
...which isn't much help at all (and doesn't point to your page - it will in a minute)

Also the actual lib.php files in moodle contain another function (e.g. from progress report)...

function report_progress_page_type_list($pagetype, $parentcontext, $currentcontext) {
$array = array(
'*' => get_string('page-x', 'pagetype'),
'report-*' => get_string('page-report-x', 'pagetype'),
'report-progress-*' => get_string('page-report-progress-x', 'report_progress'),
'report-progress-index' => get_string('page-report-progress-index', 'report_progress'),
);
return $array;
}


That isn't mentioned anywhere. Do I need it and what does it do (never seen anything like this before)??

It also doesn't mention the function (e.g.) report_completion_extend_navigation_user which is talked about in the upgrade.txt. Basically, there seems to be a bunch of stuff that can go in the lib.php which isn't in the docs and isn't terribly intuitive (well, not to me anyway!)