Fix PHP errors

pull/3844/head
Julio Montoya 4 years ago
parent 751874e559
commit 65c404e1c9
  1. 3
      public/main/inc/lib/sessionmanager.lib.php
  2. 2
      public/main/mySpace/myStudents.php
  3. 3
      public/main/session/session_edit.php

@ -1632,6 +1632,7 @@ class SessionManager
$sendSubscriptionNotification = false, $sendSubscriptionNotification = false,
$status = 0 $status = 0
) { ) {
$id = (int) $id;
$status = (int) $status; $status = (int) $status;
$coachId = (int) $coachId; $coachId = (int) $coachId;
$sessionCategoryId = (int) $sessionCategoryId; $sessionCategoryId = (int) $sessionCategoryId;
@ -1679,7 +1680,7 @@ class SessionManager
} else { } else {
$sessionInfo = self::get_session_by_name($name); $sessionInfo = self::get_session_by_name($name);
$exists = false; $exists = false;
if (!empty($sessionInfo) && $sessionInfo['id'] !== $id) { if (!empty($sessionInfo) && (int) $sessionInfo['id'] !== $id) {
$exists = true; $exists = true;
} }

@ -1576,7 +1576,7 @@ if (empty($details)) {
/** @var CLpCategory $item */ /** @var CLpCategory $item */
foreach ($categories as $item) { foreach ($categories as $item) {
$categoryId = $item->getIid(); $categoryId = $item->getIid();
if (!learnpath::categoryIsVisibleForStudent($item, $userEntity, $courseId, $sessionId)) { if (!learnpath::categoryIsVisibleForStudent($item, $userEntity, $course, $session)) {
continue; continue;
} }

@ -2,9 +2,6 @@
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
/**
* Sessions edition script.
*/
$cidReset = true; $cidReset = true;
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';

Loading…
Cancel
Save