From 08f46d9148aea045759bacb4b99d669e9ecd0cc2 Mon Sep 17 00:00:00 2001 From: Ricardo Verduguez Date: Wed, 27 Nov 2024 14:40:05 +0100 Subject: [PATCH] Removed functionality of logging the instance when its deletion --- lib.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lib.php b/lib.php index 447ef3c..b74155c 100644 --- a/lib.php +++ b/lib.php @@ -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]);