From 2a920abd5b366c6f965e19effc9268d126add74a Mon Sep 17 00:00:00 2001 From: Mihail Geshoski Date: Mon, 14 Feb 2022 17:48:30 +0800 Subject: [PATCH] MDL-73840 mod_feedback: Remove the duplicate navigation selector The patch removes the duplicate navigation selector which appears in the 'Show non-respondents' page by removing the 'nonrespondents' node from the module's settings navigation. Additionally, it highlights the 'Responses' item in the secondary navigation and sets it as active in the module settings navigation. --- mod/feedback/lib.php | 6 ------ mod/feedback/show_nonrespondents.php | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mod/feedback/lib.php b/mod/feedback/lib.php index cfc943c4dd4..a27ad9d768e 100644 --- a/mod/feedback/lib.php +++ b/mod/feedback/lib.php @@ -2850,12 +2850,6 @@ function feedback_extend_settings_navigation(settings_navigation $settings, $feedbacknode->add(get_string(($hassecondary ? 'responses' : 'show_entries'), 'feedback'), new moodle_url('/mod/feedback/show_entries.php', ['id' => $PAGE->cm->id]), navigation_node::TYPE_CUSTOM, null, 'responses'); - - if ($feedback->anonymous == FEEDBACK_ANONYMOUS_NO AND $feedback->course != SITEID) { - $feedbacknode->add(get_string('show_nonrespondents', 'feedback'), - new moodle_url('/mod/feedback/show_nonrespondents.php', ['id' => $PAGE->cm->id]), - navigation_node::TYPE_CUSTOM, null, 'nonrespondents'); - } } else { $feedbackcompletion = new mod_feedback_completion($feedback, $context, $PAGE->course->id); if ($feedbackcompletion->can_view_analysis()) { diff --git a/mod/feedback/show_nonrespondents.php b/mod/feedback/show_nonrespondents.php index a81e30d3426..b1c4d361c50 100644 --- a/mod/feedback/show_nonrespondents.php +++ b/mod/feedback/show_nonrespondents.php @@ -137,6 +137,10 @@ if ($action == 'sendmessage' AND $canbulkmessaging) { /// Print the page header $PAGE->set_heading($course->fullname); $PAGE->set_title($feedback->name); +$PAGE->set_secondary_active_tab('responses'); +if ($responsesnode = $PAGE->settingsnav->find('responses', navigation_node::TYPE_CUSTOM)) { + $responsesnode->make_active(); +} $PAGE->activityheader->set_attrs([ 'hidecompletion' => true, 'description' => ''