diff --git a/mod/bigbluebuttonbn/classes/output/index.php b/mod/bigbluebuttonbn/classes/output/index.php index 2192a4afcc9..4fa5e4a4e9c 100644 --- a/mod/bigbluebuttonbn/classes/output/index.php +++ b/mod/bigbluebuttonbn/classes/output/index.php @@ -59,8 +59,15 @@ class index implements renderable { public function get_table(renderer_base $output): html_table { // Print the list of instances. $table = new html_table(); + + if (course_format_uses_sections($this->course->format)) { + $sectionheading = get_string('sectionname', "format_{$this->course->format}"); + } else { + $sectionheading = ''; + } + $table->head = [ - get_string('week'), + $sectionheading, get_string('index_heading_name', plugin::COMPONENT), get_string('index_heading_group', plugin::COMPONENT), get_string('index_heading_users', plugin::COMPONENT), @@ -118,6 +125,12 @@ class index implements renderable { } $meeting = new meeting($instance); + if (course_format_uses_sections($this->course->format)) { + $sectionname = get_section_name($this->course, $instance->get_cm()->sectionnum); + } else { + $sectionname = ''; + } + $viewurl = $instance->get_view_url(); if ($groupid = $instance->get_group_id()) { $viewurl->param('group', $groupid); @@ -128,7 +141,7 @@ class index implements renderable { // The meeting info was returned. if ($meeting->is_running()) { return [ - $instance->get_cm()->sectionnum, + $sectionname, $joinurl, $instance->get_group_name(), $this->get_room_usercount($meeting), @@ -139,7 +152,7 @@ class index implements renderable { ]; } - return [$instance->get_cm()->sectionnum, $joinurl, $instance->get_group_name(), '', '', '', '', '']; + return [$sectionname, $joinurl, $instance->get_group_name(), '', '', '', '', '']; } /**