Change query to find session coached by user

pull/3995/head
Angel Fernando Quiroz Campos 3 years ago
parent 600b58f669
commit c9cb4b6d55
  1. 7
      public/main/inc/lib/sessionmanager.lib.php

@ -6037,7 +6037,12 @@ class SessionManager
break;
case 'teacher':
case 'session_admin':
$sessionConditions = " AND s.id_coach = $userId ";
$generalCoachedSessions = array_map(
fn(Session $session) => $session->getId(),
api_get_user_entity($userId)->getSessionsAsGeneralCoach()
);
$sessionConditions = " AND s.IN (".implode(',', $generalCoachedSessions).") ";
$userConditionsFromDrh = '';
break;
}

Loading…
Cancel
Save