Skip to content

Commit cbc77b6

Browse files
committed
Learnpath: Fix LP visibility to review registry in base course if nothing set in session - refs BT#22396
1 parent e231912 commit cbc77b6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

main/lp/learnpath.class.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,6 +2368,15 @@ public static function is_lp_visible_for_student(
23682368
$lp_id,
23692369
$sessionId
23702370
);
2371+
// If there is no registry for the session verify the registry in the base course
2372+
if (empty($itemInfo)) {
2373+
$itemInfo = api_get_item_property_info(
2374+
$courseId,
2375+
TOOL_LEARNPATH,
2376+
$lp_id,
2377+
0
2378+
);
2379+
}
23712380

23722381
// If the item was deleted or is invisible.
23732382
if (isset($itemInfo['visibility']) && ($itemInfo['visibility'] == 2 || $itemInfo['visibility'] == 0)) {

0 commit comments

Comments
 (0)