diff --git a/classes/package.php b/classes/package.php index 486da872..e9a819ab 100644 --- a/classes/package.php +++ b/classes/package.php @@ -213,7 +213,6 @@ public function store_in_db(int $contextid = 0) { $transaction = $DB->start_delegated_transaction(); $packageid = $DB->insert_record('qtype_questionpy_package', $packagedata); - $transaction->allow_commit(); // For each language store the localized package data as a separate record. $languagedata = array(); @@ -235,7 +234,6 @@ public function store_in_db(int $contextid = 0) { ]; } - $transaction = $DB->start_delegated_transaction(); $DB->insert_records('qtype_questionpy_tags', $tagsdata); $DB->insert_records('qtype_questionpy_language', $languagedata); $transaction->allow_commit();