moodle-report_usergrades/settings.php
Kumi 8d339008c1
feat: Enhances usergrades report page configuration
Replaces hardcoded URL with moodle_url for flexibility and security.
Adds capability requirement 'report/usergrades:view' for improved access control.
2024-11-20 17:46:27 +01:00

11 lines
356 B
PHP

<?php
defined('MOODLE_INTERNAL') || die();
if ($hassiteconfig) { // Needs this condition or there is error on login page
$ADMIN->add('reports', new admin_externalpage(
'report_usergrades',
get_string('pluginname', 'report_usergrades'),
new moodle_url('/report/usergrades/index.php'),
'report/usergrades:view'
));
}