From 11292b6f6f480c87a176f8ab9b282f94568677dc Mon Sep 17 00:00:00 2001 From: Simon Thordal Date: Mon, 21 Oct 2024 13:07:13 +0200 Subject: [PATCH] trying again v5 --- .../generator/{mod_homework_generator.php => lib.php} | 10 +++------- server/moodle/mod/homework/version.php | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) rename server/moodle/mod/homework/tests/generator/{mod_homework_generator.php => lib.php} (88%) diff --git a/server/moodle/mod/homework/tests/generator/mod_homework_generator.php b/server/moodle/mod/homework/tests/generator/lib.php similarity index 88% rename from server/moodle/mod/homework/tests/generator/mod_homework_generator.php rename to server/moodle/mod/homework/tests/generator/lib.php index 394793c09..fbcf651cb 100644 --- a/server/moodle/mod/homework/tests/generator/mod_homework_generator.php +++ b/server/moodle/mod/homework/tests/generator/lib.php @@ -14,12 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -namespace generator; -use stdClass; -use testing_module_generator; - /** - * homework/tests/generator/mod_homework_generator.php + * homework/tests/generator/lib.php * * @package mod_homework * @copyright 2024, cs-24-sw-5-01 @@ -34,12 +30,12 @@ class mod_homework_generator extends testing_module_generator { /** * Create an instance of the homework module. * - * @param array|stdClass|null $record The test data for the homework instance. + * @param array|null $record The test data for the homework instance. * @param array|null $options * @return stdClass The homework instance. * @throws \dml_exception */ - public function create_instance(array|null|\stdClass $record = null, array|null $options = null): stdClass { + public function create_instance($record = null, ?array $options = null) { global $DB; // Merge incoming data with defaults. diff --git a/server/moodle/mod/homework/version.php b/server/moodle/mod/homework/version.php index f8d6da733..391839d39 100644 --- a/server/moodle/mod/homework/version.php +++ b/server/moodle/mod/homework/version.php @@ -23,8 +23,6 @@ */ defined('MOODLE_INTERNAL') || die(); -global $plugin; - $plugin->version = 2024101400; // The current module version (Date: YYYYMMDDXX). $plugin->requires = 2024090300; // Requires this Moodle version.