From 03400bf37f30dbf1c6293a8c937f505474fa6ffa Mon Sep 17 00:00:00 2001 From: Jane Adelmann Date: Tue, 26 Nov 2024 15:11:14 +0200 Subject: [PATCH] v3.15.7 Fix issue with saving Enable AI Detector parameter --- lib.php | 6 +++++- version.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib.php b/lib.php index eb1bde6..c80e7d6 100644 --- a/lib.php +++ b/lib.php @@ -93,6 +93,11 @@ function plagiarism_pchkorg_coursemodule_standard_elements($formwrapper, $mform) )) { $mform->setDefault('pchkorg_student_can_see_widget', 1); } + if (!isset($exportedvalues['pchkorg_check_ai']) || is_null( + $exportedvalues['pchkorg_check_ai'] + )) { + $mform->setDefault('pchkorg_check_ai', 1); + } if (null === $cm) { if (!isset($exportedvalues['pchkorg_module_use']) @@ -199,7 +204,6 @@ function plagiarism_pchkorg_coursemodule_standard_elements($formwrapper, $mform) get_string('pchkorg_check_ai', 'plagiarism_pchkorg'), array(get_string('no'), get_string('yes')) ); - $mform->setDefault('pchkorg_check_ai', 1); } } diff --git a/version.php b/version.php index 356cd40..0e3fa8a 100644 --- a/version.php +++ b/version.php @@ -26,9 +26,9 @@ defined('MOODLE_INTERNAL') || die(); if (!isset($plugin)) { $plugin = new stdClass(); } -$plugin->version = 2024102819; +$plugin->version = 2024112615; $plugin->requires = 2020061501; // Requires Moodle 3.9 . -$plugin->release = 'v3.15.6'; +$plugin->release = 'v3.15.7'; $plugin->component = 'plagiarism_pchkorg'; $plugin->maturity = MATURITY_STABLE; $plugin->dependencies = array(