From 2804e7c01c4d86e63e98c44ee5704d4c770ed9d9 Mon Sep 17 00:00:00 2001 From: Philipp Memmel Date: Wed, 2 Oct 2024 07:08:27 +0200 Subject: [PATCH] MBS-9386: Remove correct config keys on purpose uninstall --- classes/plugininfo/aipurpose.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/plugininfo/aipurpose.php b/classes/plugininfo/aipurpose.php index fdbfb45..1070be7 100644 --- a/classes/plugininfo/aipurpose.php +++ b/classes/plugininfo/aipurpose.php @@ -162,7 +162,8 @@ public function load_settings(\part_of_admin_tree $adminroot, $parentnodename, $ #[\Override] public function uninstall(\progress_trace $progress) { global $DB; - $DB->delete_records('local_ai_manager_config', ['configkey' => 'purpose_' . $this->name . '_tool']); + $DB->delete_records('local_ai_manager_config', ['configkey' => 'purpose_' . $this->name . '_tool_role_basic']); + $DB->delete_records('local_ai_manager_config', ['configkey' => 'purpose_' . $this->name . '_tool_role_extended']); $DB->delete_records('local_ai_manager_config', ['configkey' => $this->name . '_max_requests_basic']); $DB->delete_records('local_ai_manager_config', ['configkey' => $this->name . '_max_requests_extended']); return true;