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() . '';