fix: Removes login page error check for usergrades
Eliminates redundant $hassiteconfig condition, preventing potential login page errors as site configuration check is unnecessary for accessing the user grades report administration. Updates URL concatenation to use $CFG->wwwroot for consistency.
This commit is contained in:
parent
8d339008c1
commit
d3eed13d51
1 changed files with 6 additions and 8 deletions
14
settings.php
14
settings.php
|
@ -1,11 +1,9 @@
|
|||
<?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'
|
||||
));
|
||||
}
|
||||
$ADMIN->add('reports', new admin_externalpage(
|
||||
'report_usergrades',
|
||||
get_string('pluginname', 'report_usergrades'),
|
||||
$CFG->wwwroot . "/report/usergrades/index.php",
|
||||
'report/usergrades:view'
|
||||
));
|
||||
|
|
Loading…
Reference in a new issue