MDL-58762 core: Get full course objects on navigation

The course object passed as parameter to extend_navigation_user
callback contained only a few parameters, some parameters like
showgrades or showreports were missing.
The callback should receive a full course object.
This commit is contained in:
Juan Leyva 2017-07-05 13:18:08 +01:00 committed by David Monllao
parent 85b531e8be
commit 35b9bca0ca

View File

@ -2401,7 +2401,7 @@ class global_navigation extends navigation_node {
$reports = core_component::get_plugin_list('gradereport'); $reports = core_component::get_plugin_list('gradereport');
arsort($reports); // User is last, we want to test it first. arsort($reports); // User is last, we want to test it first.
$userscourses = enrol_get_users_courses($user->id); $userscourses = enrol_get_users_courses($user->id, false, '*');
$userscoursesnode = $usernode->add(get_string('courses')); $userscoursesnode = $usernode->add(get_string('courses'));
$count = 0; $count = 0;