From fff6b8b710461dd6742f6a562c9b2f7505aa0970 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Fri, 28 Apr 2023 17:34:31 +0100 Subject: [PATCH] MDL-77993 mod_lesson: ensure report action menu always present. --- mod/lesson/report.php | 15 ++++++--------- theme/classic/tests/behat/blacklist.json | 3 +-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/mod/lesson/report.php b/mod/lesson/report.php index 4d13732ff4b..ea20d01b8aa 100644 --- a/mod/lesson/report.php +++ b/mod/lesson/report.php @@ -120,9 +120,8 @@ if ($action === 'delete') { if ($table === false) { echo $lessonoutput->header($lesson, $cm, $action, false, null, get_string('nolessonattempts', 'lesson')); - if ($PAGE->has_secondary_navigation()) { - echo $reportactionarea; - } + echo $reportactionarea; + if (!empty($currentgroup)) { $groupname = groups_get_group_name($currentgroup); echo $OUTPUT->notification(get_string('nolessonattemptsgroup', 'lesson', $groupname)); @@ -135,9 +134,8 @@ if ($action === 'delete') { } echo $lessonoutput->header($lesson, $cm, $action, false, null, get_string('overview', 'lesson')); - if ($PAGE->has_secondary_navigation()) { - echo $reportactionarea; - } + echo $reportactionarea; + groups_print_activity_menu($cm, $url); $course_context = context_course::instance($course->id); @@ -265,9 +263,8 @@ if ($action === 'delete') { **************************************************************************/ echo $lessonoutput->header($lesson, $cm, $action, false, null, get_string('detailedstats', 'lesson')); - if ($PAGE->has_secondary_navigation()) { - echo $reportactionarea; - } + echo $reportactionarea; + groups_print_activity_menu($cm, $url); $course_context = context_course::instance($course->id); diff --git a/theme/classic/tests/behat/blacklist.json b/theme/classic/tests/behat/blacklist.json index edc4a37f139..63f6dbf7589 100644 --- a/theme/classic/tests/behat/blacklist.json +++ b/theme/classic/tests/behat/blacklist.json @@ -11,8 +11,7 @@ "course/format/tests/behat/courseindex_keyboardnav.feature", "course/format/tests/behat/courseindex_completion.feature", "course/format/tests/behat/courseindex_language.feature", - "badges/tests/behat/badge_navigation.feature", - "mod/lesson/tests/behat/lesson_report_detailed_statistics.feature" + "badges/tests/behat/badge_navigation.feature" ], "tags": [ "addablocklink"