Fix get first resource link in course session

pull/4002/head
Angel Fernando Quiroz Campos 3 years ago
parent e822afd947
commit 1f3583b7bc
  1. 2
      public/main/lp/learnpathList.class.php
  2. 14
      src/CoreBundle/Entity/AbstractResource.php

@ -119,7 +119,7 @@ class LearnpathList
$lp->getId(),
$session_id
);*/
$visibility = $lp->isVisible($course, $session);
$visibility = $lp->isVisible($course);
// If option is not true then don't show invisible LP to user
if (false === $ignoreLpVisibility) {

@ -435,19 +435,7 @@ abstract class AbstractResource
$found = false;
$link = null;
foreach ($links as $link) {
if (null === $session) {
$found = $link->getCourse() === $course;
break;
}
if ((new ReflectionClass($this))->hasProperty('loadCourseResourcesInSession')) {
$found = $link->getSession() === $session || null === $link->getSession();
break;
}
if ($link->getSession() === $session) {
if ($link->getCourse() === $course && $link->getSession() === $session) {
$found = true;
break;

Loading…
Cancel
Save