Minor - format code

pull/4020/head
Julio 3 years ago
parent 4cff20a715
commit 266bf94524
  1. 1
      public/main/inc/lib/sortable_table.class.php
  2. 3
      public/main/work/work.lib.php
  3. 7
      src/CoreBundle/Security/Authorization/Voter/ResourceVoter.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) {

@ -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) {

@ -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)
;

Loading…
Cancel
Save