File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ public function export_for_template(\renderer_base $output) {
109109 $ format ->hastopictabs = count ($ tabslist ) > 0 ;
110110
111111 $ courseindex = '' ;
112+ $ hassubtabs = false ;
112113 if ($ course ->tabsview == \format_onetopic::TABSVIEW_COURSEINDEX ) {
113114 $ renderer = $ format ->get_renderer ($ PAGE );
114115 $ courseindex = $ renderer ->render_from_template ('core_courseformat/local/courseindex/drawer ' , []);
@@ -117,6 +118,7 @@ public function export_for_template(\renderer_base $output) {
117118 } else if ($ course ->tabsview == \format_onetopic::TABSVIEW_VERTICALALL ) {
118119 $ hastopictabs = $ format ->hastopictabs ;
119120 $ hassecondrow = false ;
121+ $ hassubtabs = true ;
120122
121123 foreach ($ tabslist as $ tab ) {
122124 if (isset ($ tab ->secondrow ) && is_array ($ tab ->secondrow )) {
@@ -177,6 +179,7 @@ public function export_for_template(\renderer_base $output) {
177179 'tabs ' => $ tabslist ,
178180 'activetab ' => $ activetab ,
179181 'hassecondrow ' => $ hassecondrow ,
182+ 'hassubtabs ' => $ hassubtabs ,
180183 'secondrow ' => $ secondtabslist ,
181184 'tabsviewclass ' => $ tabsview ,
182185 'hasformatmsgs ' => count (\format_onetopic::$ formatmsgs ) > 0 ,
Original file line number Diff line number Diff line change 5252 </div >
5353 { {/availablemessage} }
5454 </a >
55- { {#haschilds} }
56- { {> format_onetopic/courseformat/tabsubtree} }
57- { {/haschilds} }
55+ { {#hassubtabs} }
56+ { {#haschilds} }
57+ { {> format_onetopic/courseformat/tabsubtree} }
58+ { {/haschilds} }
59+ { {/hassubtabs} }
5860 </li >
5961 { {/tabs} }
6062</ul >
You can’t perform that action at this time.
0 commit comments