MDL-73233 course: Remove make_active() call

When accessing to User grades and then to the grades from a
specific course, this call was causing several behat errors
because the dashboard node was not found.
The code causing this issue can be safely removed because it
isn't used (the current node is calculated a few lines below).
This commit is contained in:
Sara Arjona 2022-02-28 16:04:25 +01:00
parent 07f7da93cc
commit 9261157cc3

View file

@ -138,8 +138,6 @@ switch ($mode) {
// Change the navigation to point to the my grade node (If we are a student).
if ($USER->id == $user->id) {
require_once($CFG->dirroot . '/user/lib.php');
// Make the dashboard active so that it shows up in the navbar correctly.
$gradenode = $PAGE->settingsnav->find('dashboard', null)->make_active();
// Get the correct 'Grades' url to point to.
$activeurl = user_mygrades_url();
$navbar = $PAGE->navbar->add(get_string('grades', 'grades'), $activeurl, navigation_node::TYPE_SETTING);