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

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

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

Loading…
Cancel
Save