Skip to content

Commit f9ca677

Browse files
committed
Fix case where not visible module was not hide
1 parent 63b580d commit f9ca677

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

block_course_modulenavigation.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public function get_content() {
280280
}
281281
$thissection->modules[] = $thismod;
282282
} else {
283-
$thissection->modules[] = $this->checkmodule(
283+
$modulechecked = $this->checkmodule(
284284
$module,
285285
$context,
286286
$completioninfo,
@@ -289,6 +289,10 @@ public function get_content() {
289289
$myactivityid,
290290
$thissection,
291291
);
292+
293+
if($modulechecked !== null) {
294+
$thissection->modules[] = $modulechecked;
295+
}
292296
}
293297
}
294298

0 commit comments

Comments
 (0)