Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
jrchamp authored Apr 18, 2024
1 parent 88453f5 commit 7a2d534
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
9 changes: 9 additions & 0 deletions classes/task/get_meeting_recordings.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ public function execute() {

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

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

Expand Down
7 changes: 1 addition & 6 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -966,16 +966,11 @@ function xmldb_zoom_upgrade($oldversion) {
}

if ($oldversion < 2024030101) {

// Update existing recording names to default for translatable recordingtype strings.
$meetings = $DB->get_records('zoom');

foreach ($meetings as $meeting) {
var_dump($meeting);
$value = $meeting->name;
$select = "zoomid = ". $meeting->id;

$DB->set_field_select('zoom_meeting_recordings', 'name', $value, $select);
$DB->set_field_select('zoom_meeting_recordings', 'name', $meeting->name, 'zoomid = ?', [$meeting->id]);
}

// Zoom savepoint reached.
Expand Down

0 comments on commit 7a2d534

Please sign in to comment.