From 37d39127d38d97a7b85fcba061ef26bb3a9c54bb Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sun, 3 Dec 2017 19:35:08 +0400 Subject: Adjustments were made on the main page --- index.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 3abb55d..243d574 100644 --- a/index.php +++ b/index.php @@ -65,11 +65,8 @@ if (!empty($deleteid) && confirm_sesskey()) { /* Updates an existing token */ if (!empty($hideshowid) && confirm_sesskey()) { - if ($record = tool_managertokens_find_record($hideshowid)) { - $record->enabled = !boolval($record->enabled); - tool_managertokens_update_record($record); - redirect($baseurl, new lang_string("changessaved", "moodle")); - } + tool_managertokens_change_status($hideshowid); + redirect($baseurl, new lang_string("changessaved", "moodle")); } /* Specifies the title of the page */ -- cgit v1.2.3