General developer forum

My new report plugin is not listed

 
Picture of Nicolas JOURDAIN
My new report plugin is not listed
 

Hi there,

I created a new report plugin (https://github.com/navitaslts/moodle-report_ncmusergrades).

Logged as a admin, the report is listed in 'Site Administration / Reports'.

Logged as a different user (new role with ARCHETYPE: Teacher (non-editing)), the report is not listed. Only 2 reports are listed (see screenshoot)

User without the new report

I believe I have an issue with the capabilities.

What capabilities a user needs to see my report?

Thanks for your help!

 
Average of ratings: -
Picture of Nicolas JOURDAIN
Re: My new report plugin is not listed (SOLVED)
 

I solved my problem.

Here how:

#Before:
$ADMIN->add(
'reports',
new admin_externalpage(
'reportlinkname',
get_string('reportlinkname', 'report_ncmusergrades'),
new moodle_url('/report/ncmusergrades/index.php'),
);

#After:

$ADMIN->add(
'reports',
new admin_externalpage(
'reportlinkname',
get_string('reportlinkname', 'report_ncmusergrades'),
new moodle_url('/report/ncmusergrades/index.php'),
'report/ncmusergrades:use'));

I added the capabilities when I create the link to the report.

Hope it will help someone else!

 
Average of ratings: -