-
Notifications
You must be signed in to change notification settings - Fork 10
How it is linked to the menu
Marcus Green edited this page Sep 23, 2024
·
3 revisions
The report is inserted into the menu through a funtion in lib.php called
port_advancedgrading_extend_navigation_module
This can be found in this file
https://github.com/marcusgreen/moodle-report_advancedgrading/blob/main/lib.php#L42
It includes a switch case block like this
case 'rubric':
$url = new moodle_url('/report/advancedgrading/rubric.php', array('id' => $cm->course, 'modid' => $cm->id));
$navigation->add(get_string('rubricgrades', 'report_advancedgrading'), $url, navigation_node::TYPE_SETTING, null,
'rubricgrades');
break;
case 'rubref':
$url = new moodle_url('/report/advancedgrading/rubref.php', array('id' => $cm->course, 'modid' => $cm->id));
$navigation->add(get_string('rubricgrades', 'report_advancedgrading'), $url, navigation_node::TYPE_SETTING, null,
'rubrefgrades');
break;
etc etc
It could be extended in the future by adding new cases which would hock the report into the menu system