Note: You are currently viewing documentation for Moodle 2.6. Up-to-date documentation for the latest stable version of Moodle may be available here: Course Report Plugins.

Development:Course Report Plugins: Difference between revisions

From MoodleDocs
(Course Report Plugins)
 
No edit summary
 
Line 1: Line 1:
A course report plugin is just another folder inside course/report/
A course report plugin is just another folder inside course/report/. It follows standard plugin practice and may have lang, db etc. sub-folders if these are required. A version.php file must be included.


If there is a mod.html file inside there, it will be included with the others when you visit course/report.php?id={courseid} in your browser.
A mod.php file must be included. This is responsible for creating the HTML fragment that will appear on the course report page as one of the report options. This can be anything. Typically, it will simply generate a link to another page in the report folder (usually index.php) that produces the report. It may, like the logs report generate a form to be completed.
 
That HTML fragment can do anything you like. A common thing is to include a link to course/report/myreport/index.php. That's all it is, simple, and gives you almost unlimited flexibility.

Latest revision as of 11:48, 21 December 2010

A course report plugin is just another folder inside course/report/. It follows standard plugin practice and may have lang, db etc. sub-folders if these are required. A version.php file must be included.

A mod.php file must be included. This is responsible for creating the HTML fragment that will appear on the course report page as one of the report options. This can be anything. Typically, it will simply generate a link to another page in the report folder (usually index.php) that produces the report. It may, like the logs report generate a form to be completed.