diff --git a/public/main/inc/lib/sortable_table.class.php b/public/main/inc/lib/sortable_table.class.php index d0bc83c7b5..87fde30829 100644 --- a/public/main/inc/lib/sortable_table.class.php +++ b/public/main/inc/lib/sortable_table.class.php @@ -374,6 +374,7 @@ class SortableTable extends HTML_Table $table_id = 'form_'.$this->table_name.'_id'; $html = ''; $form = ''; + $nav = ''; if (false === $this->hideNavigation) { // Only show pagination if there are more than 1 page. if ($this->get_pager()->numPages() > 1) { diff --git a/public/main/work/work.lib.php b/public/main/work/work.lib.php index c48bda2dd2..0fc572cbc5 100644 --- a/public/main/work/work.lib.php +++ b/public/main/work/work.lib.php @@ -1470,10 +1470,9 @@ function getAllWorkListStudent( while ($work = Database::fetch_array($result, 'ASSOC')) { $courseId = $work['c_id']; $courseInfo = $courseList[$work['c_id']]; - $courseCode = $courseInfo['code']; $sessionId = $work['session_id']; - $cidReq = api_get_cidreq_params($courseCode, $sessionId); + $cidReq = api_get_cidreq_params($courseId, $sessionId); $url = api_get_path(WEB_CODE_PATH).'work/work_list.php?'.$cidReq; $isSubscribed = userIsSubscribedToWork($userId, $work['iid'], $courseId); if (false == $isSubscribed) { diff --git a/src/CoreBundle/Security/Authorization/Voter/ResourceVoter.php b/src/CoreBundle/Security/Authorization/Voter/ResourceVoter.php index 5b3dbd553f..5509b92a31 100644 --- a/src/CoreBundle/Security/Authorization/Voter/ResourceVoter.php +++ b/src/CoreBundle/Security/Authorization/Voter/ResourceVoter.php @@ -8,7 +8,6 @@ namespace Chamilo\CoreBundle\Security\Authorization\Voter; use Chamilo\CoreBundle\Entity\AbstractResource; use Chamilo\CoreBundle\Entity\Course; -use Chamilo\CoreBundle\Entity\ResourceNode; use Chamilo\CourseBundle\Entity\CGroup; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Security\Acl\Permission\MaskBuilder; @@ -35,8 +34,7 @@ class ResourceVoter extends Voter public static function getReaderMask(): int { - $builder = new MaskBuilder(); - $builder + $builder = (new MaskBuilder()) ->add(self::VIEW) ; @@ -45,8 +43,7 @@ class ResourceVoter extends Voter public static function getEditorMask(): int { - $builder = new MaskBuilder(); - $builder + $builder = (new MaskBuilder()) ->add(self::VIEW) ->add(self::EDIT) ;