Skip to content

Commit

Permalink
Merge branch 'MDL-78038-402' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_402_STABLE
  • Loading branch information
junpataleta committed May 3, 2023
2 parents a7055da + 01fd68f commit 4e9be8c
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions mod/bigbluebuttonbn/classes/output/index.php
Expand Up @@ -59,8 +59,15 @@ public function __construct(stdClass $course, array $instances) {
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),
Expand Down Expand Up @@ -118,6 +125,12 @@ protected function add_room_row_to_table(renderer_base $output, instance $instan
}
$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);
Expand All @@ -128,7 +141,7 @@ protected function add_room_row_to_table(renderer_base $output, instance $instan
// 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),
Expand All @@ -139,7 +152,7 @@ protected function add_room_row_to_table(renderer_base $output, instance $instan
];
}

return [$instance->get_cm()->sectionnum, $joinurl, $instance->get_group_name(), '', '', '', '', ''];
return [$sectionname, $joinurl, $instance->get_group_name(), '', '', '', '', ''];
}

/**
Expand Down

0 comments on commit 4e9be8c

Please sign in to comment.