From 49b9b255d39818b2182210840d30b2931b0c58ac Mon Sep 17 00:00:00 2001 From: waleedhassan Date: Wed, 16 Jul 2025 19:37:45 +0100 Subject: [PATCH] WR #463311: Possible core bug - availability menu Changed the logic so that in edit mode it only shows name istead of content so that it doesnt interfare with the edit section and cause issues with availability drop down --- block_section.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/block_section.php b/block_section.php index 17c7eb8..760f42c 100644 --- a/block_section.php +++ b/block_section.php @@ -89,11 +89,17 @@ public function get_content() { $cminfo = \cm_info::create($cm); if (!($url = $cm->url)) { - $this->content->items[] = $cminfo->get_formatted_content(); + if ($this->page->user_is_editing()) { + // Only show activity name when it is on edit mode + $this->content->items[] = $cminfo->get_formatted_name(); + } else { + // Normal view + $this->content->items[] = $cminfo->get_formatted_content(); + } $this->content->icons[] = ''; } else { $linkcss = $cm->visible ? '' : ' class="dimmed" '; - // Accessibility: incidental image - should be empty Alt text + // Accessibility: incidental image – should be empty alt text. $icon = ' '; $this->content->items[] = '' . $icon . $cminfo->get_formatted_name() . '';