Skip to content

Commit

Permalink
recordings: compare UUIDs; use correct variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jrchamp committed Apr 22, 2024
1 parent 506b649 commit fea6409
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions classes/task/get_meeting_recordings.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,28 +104,26 @@ public function execute() {
$zoomrecordings = $service->get_user_recordings($hostid, $from, $to);

foreach ($zoomrecordings as $recordingid => $recording) {
if (empty($meetings[$recording->meetingid])) {
// Skip meetings that are not in Moodle.
mtrace('Meeting id: ' . $recording->meetingid . ' does not exist...skipping');
continue;
}

$zoom = $meetings[$recording->meetingid];

if (isset($localrecordings[$recording->meetinguuid][$recordingid])) {
mtrace('Recording id: ' . $recordingid . ' exists...skipping');
$localrecording = $localrecordings[$recording->meetinguuid][$recordingid];

if ($localrecording->recordingtype !== $zoom->recordingtype) {
if ($localrecording->recordingtype !== $recording->recordingtype) {
$updatemeeting = (object) [
'id' => $localrecording->id,
'recordingtype' => $zoom->recordingtype,
'recordingtype' => $recording->recordingtype,
];
$DB->update_record('zoom_meeting_recordings', $updatemeeting);
}
continue;
}

if (empty($meetings[$recording->meetingid])) {
// Skip meetings that are not in Moodle.
mtrace('Meeting id: ' . $recording->meetingid . ' does not exist...skipping');
continue;
}

// As of 2023-09-24, 'password' is not present in the user recordings API response.
if (empty($meetingpasscodes[$recording->meetinguuid])) {
try {
Expand All @@ -136,6 +134,7 @@ public function execute() {
}
}

$zoom = $meetings[$recording->meetingid];
$recordingtype = $recording->recordingtype;

$record = new stdClass();
Expand Down

0 comments on commit fea6409

Please sign in to comment.