Show
Really hard to find simple testing instructions but here's how I was able to test the fix rapidly :
In the plugin "tool_monitor" (admin/tool/monitor/), comment the function (tool_monitor_extend_navigation_user_settings) in lib.php
Add the following code in lib.php :
function tool_monitor_extend_navigation_user(navigation_node $parentnode, stdClass $user, context_user $context,
stdClass $course, $coursecontext) {
$url = new moodle_url('/admin/tool/monitor/index.php');
$subsnode = navigation_node::create(get_string('managesubscriptions', 'tool_monitor'), $url,
navigation_node::TYPE_SETTING, null, 'monitor', new pix_icon('i/settings', ''));
if (isset($subsnode) && !empty($parentnode)) {
$parentnode->add_node($subsnode);
}
}
function tool_monitor_myprofile_navigation(core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course) {
$url = new moodle_url('/admin/tool/monitor/index.php');
$node = new core_user\output\myprofile\node('miscellaneous', 'monitor',
get_string('managesubscriptions', 'tool_monitor'), null, $url);
$tree->add_node($node);
return true;
}
Purge caches
As an admin, activate "Event monitoring rules"
Go to "User > Profile" and assert that "Event monitoring" link is displayed in the "Miscellaneous".
Click on the "Event monitoring" link and assert that the breadcrumb is working accordingly (Dashboard > Profile > Event monitoring)
Go to the a user's profile in the participants list of a course and assert that "Event monitoring" link is displayed in the "Miscellaneous".
Click on the "Event monitoring" link and assert that the breadcrumb is working (Dashboard > Profile > Event monitoring) Note : We would need to use "$PAGE->extend_for_user" to display the right breadcrumb.