mirror of
https://github.com/moodle/moodle.git
synced 2025-03-23 00:50:15 +01:00
MDL-78038 mod_bigbluebuttonbn: observe course format section config.
This commit is contained in:
parent
b2d0712748
commit
4f7dd1a54b
@ -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(), '', '', '', '', ''];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user