From a6723de22aeb95b8aad2f5f66cfa3cb6a91644b1 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 12 Aug 2020 11:25:46 +0200 Subject: [PATCH] Minor - Plugins - Zoom - fix add/delete recording to session/group BT#17288 --- plugin/zoom/lib/ZoomPlugin.php | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/plugin/zoom/lib/ZoomPlugin.php b/plugin/zoom/lib/ZoomPlugin.php index 73e16a39cf..f457d67e3e 100644 --- a/plugin/zoom/lib/ZoomPlugin.php +++ b/plugin/zoom/lib/ZoomPlugin.php @@ -610,6 +610,19 @@ class ZoomPlugin extends Plugin if (false === curl_exec($curl)) { throw new Exception("curl_exec failed: ".curl_error($curl)); } + + $sessionId = 0; + $session = $meeting->getSession(); + if (null !== $session) { + $sessionId = $session->getId(); + } + + $groupId = 0; + $group = $meeting->getGroup(); + if (null !== $group) { + $groupId = $group->getIid(); + } + $newPath = handle_uploaded_document( $courseInfo, [ @@ -622,19 +635,20 @@ class ZoomPlugin extends Plugin '/', api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document', api_get_user_id(), - 0, + $groupId, null, 0, '', true, false, null, - $meeting->getSession()->getId(), + $sessionId, true ); + fclose($tmpFile); if (false === $newPath) { - throw new Exception('could not handle uploaded document'); + throw new Exception('Could not handle uploaded document'); } }