Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpchi committed Jan 26, 2023
2 parents e532604 + eee6d12 commit 73f8e2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion classes/output/courseformat/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ private function get_tabs(course_modinfo $modinfo, \renderer_base $output): \for
$formatoptions = course_get_format($course)->get_format_options($thissection);

$sectionname = get_section_name($course, $thissection);
$title = $sectionname;

if (!$thissection->visible || !$thissection->available) {
$title .= ': '. get_string('hiddenfromstudents');
}

$customstyles = '';
$level = 0;
Expand Down Expand Up @@ -309,7 +314,7 @@ private function get_tabs(course_modinfo $modinfo, \renderer_base $output): \for
}
}

$newtab = new \format_onetopic\singletab($section, $sectionname, $url, $sectionname,
$newtab = new \format_onetopic\singletab($section, $sectionname, $url, $title,
$availablemessage, $customstyles, $specialclass);
$newtab->active = !$inactivetab;

Expand Down
1 change: 1 addition & 0 deletions classes/tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public function count_tabs() {
public function get_secondlist() : object {

$tabstree = new \stdClass();
$tabstree->tabs = [];

foreach ($this->tabslist as $tab) {
if ($tab->selected) {
Expand Down

0 comments on commit 73f8e2d

Please sign in to comment.