Skip to content

Commit

Permalink
Removed functionality of logging the instance when its deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardo3ipunt committed Nov 27, 2024
1 parent d9ab90e commit 08f46d9
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,7 @@ function videoconnect_update_instance(object $moduleinstance, mod_videoconnect_m
function videoconnect_delete_instance(int $id): bool {
global $DB;

$sql = "UPDATE {videoconnect_uploads}
SET status = :newstatus
WHERE instance = :instance AND status = :statuscurrent";

$params = [
'newstatus' => uploads::STATUS_DELETED,
'instance' => $id,
'statuscurrent' => uploads::STATUS_NOT_EXECUTED];
$DB->execute($sql, $params);

$exists = $DB->get_record('videoconnect', ['id' => $id]);
if (!$exists) {
if (!$DB->record_exists('videoconnect', ['id' => $id])) {
return false;
}
$DB->delete_records('videoconnect', ['id' => $id]);
Expand Down

0 comments on commit 08f46d9

Please sign in to comment.