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 9dfc0c4 commit b4efce3
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,10 @@ 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]);
return true;
}

0 comments on commit b4efce3

Please sign in to comment.