diff --git a/block_booksearch.php b/block_booksearch.php index c933ade..3809593 100644 --- a/block_booksearch.php +++ b/block_booksearch.php @@ -22,7 +22,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -use block_booksearch\data\data; +use block_booksearch\local\data; defined('MOODLE_INTERNAL') || die(); diff --git a/classes/external/search_book_content.php b/classes/external/search_book_content.php index 25e5d21..57c417d 100644 --- a/classes/external/search_book_content.php +++ b/classes/external/search_book_content.php @@ -30,8 +30,8 @@ use external_single_structure; use external_value; -use block_booksearch\data\data; -use block_booksearch\search\search; +use block_booksearch\local\data; +use block_booksearch\local\search; use context_course; use invalid_parameter_exception; use stdClass; @@ -94,7 +94,7 @@ public static function execute_returns() { * array of objects each describing one search term occurance with text snippet and location data. */ public static function execute($courseid, $searchstring, $contextlength) { - global $CFG, $DB; + global $USER; require_once(__DIR__ . '/../../locallib.php'); // Validate parameter. @@ -107,9 +107,6 @@ public static function execute($courseid, $searchstring, $contextlength) { ] ); - // If an exception is thrown in the below code, all DB queries in this code will be rollback. - $transaction = $DB->start_delegated_transaction(); - $courseid = $params['courseid']; $searchstring = $params['searchstring']; $contextlength = $params['contextlength']; diff --git a/classes/data/data.php b/classes/local/data.php similarity index 99% rename from classes/data/data.php rename to classes/local/data.php index 0e3a2e7..fceb78b 100644 --- a/classes/data/data.php +++ b/classes/local/data.php @@ -22,7 +22,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -namespace block_booksearch\data; +namespace block_booksearch\local; use context_module; use moodle_url; diff --git a/classes/search/search.php b/classes/local/search.php similarity index 99% rename from classes/search/search.php rename to classes/local/search.php index eab6285..1d19d3b 100644 --- a/classes/search/search.php +++ b/classes/local/search.php @@ -22,7 +22,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -namespace block_booksearch\search; +namespace block_booksearch\local; use stdClass; diff --git a/version.php b/version.php index 19b55c3..3429855 100644 --- a/version.php +++ b/version.php @@ -23,8 +23,8 @@ */ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2024081900; // The current plugin version (Date: YYYYMMDDHH). +$plugin->version = 2024101206; // The current plugin version (Date: YYYYMMDDHH). $plugin->requires = 2020061510; // Requires this Moodle version. $plugin->component = 'block_booksearch'; // Full name of the plugin (used for diagnostics). -$plugin->release = '3.2.0'; +$plugin->release = '3.3'; $plugin->maturity = MATURITY_STABLE;