Skip to content

Commit 02b2a74

Browse files
committed
Course home: Block access of LP if is invisible for students BT#17744
1 parent 2092d9d commit 02b2a74

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main/inc/lib/course_home.lib.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,11 @@ public static function get_tools_category($course_tool_category, $courseId = 0,
701701
$courseInfo,
702702
$sessionId
703703
);
704+
// Check if LP is visible.
705+
$visibility = api_get_item_visibility($courseInfo, TOOL_LEARNPATH, $lpId, $sessionId);
706+
if (1 !== $visibility) {
707+
$add = false;
708+
}
704709
}
705710
if ($path) {
706711
$temp_row['custom_image'] = $path;

0 commit comments

Comments
 (0)