Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Admin reports: Difference between revisions

From MoodleDocs
m (Text replacement - "</code>" to "</syntaxhighlight>")
m (Text replacement - "<code php>" to "<syntaxhighlight lang="php">")
 
Line 6: Line 6:
You can use this code to create a FOLDER in which you can put your report(s):
You can use this code to create a FOLDER in which you can put your report(s):


<code php>
<syntaxhighlight lang="php">
$ADMIN->add('reports', new admin_category('my_reports', get_string('my_reports','report_my_reports')));
$ADMIN->add('reports', new admin_category('my_reports', get_string('my_reports','report_my_reports')));
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 20:35, 14 July 2021

How your report gets included in the admin tree

This section says that "by default, your report will be included in the admin tree under the 'Reports' section". How does Moodle determine the POSITION of your report in that 'Reports' section?

And how can you force your report to appear in a specific position in that 'Reports' folder, e.g. the top?

You can use this code to create a FOLDER in which you can put your report(s):

$ADMIN->add('reports', new admin_category('my_reports', get_string('my_reports','report_my_reports')));

but how do you force that folder to always appear at the top (or bottom) of the 'Reports' folder?

--Luis de Vasconcelos (talk) 22:47, 3 April 2014 (WST)