diff --git a/lang/en/plagiarism_pchkorg.php b/lang/en/plagiarism_pchkorg.php index b007f84..4e6184c 100644 --- a/lang/en/plagiarism_pchkorg.php +++ b/lang/en/plagiarism_pchkorg.php @@ -58,6 +58,7 @@ $string['pchkorg_debug_status_error'] = 'Some error for this file'; $string['pchkorg_debug_student_not_allowed_see_widget'] = 'Students can not see a similarity score'; $string['pchkorg_student_can_see_widget'] = 'Students can see a similarity score'; $string['pchkorg_student_can_see_report'] = 'Students can access a similarity report'; +$string['pchkorg_check_ai'] = 'Enable AI Detector'; $string['pchkorg_disclosure'] = 'Submission will be sent to PlagiarismCheck.org for check.
By submitting assignment I agree with Terms & Conditions diff --git a/lib.php b/lib.php index 279e142..a3d036d 100644 --- a/lib.php +++ b/lib.php @@ -173,7 +173,6 @@ function plagiarism_pchkorg_coursemodule_standard_elements($formwrapper, $mform) array(get_string('no'), get_string('yes')) ); - $mform->addElement( 'select', 'pchkorg_student_can_see_widget', @@ -187,6 +186,14 @@ function plagiarism_pchkorg_coursemodule_standard_elements($formwrapper, $mform) get_string('pchkorg_student_can_see_report', 'plagiarism_pchkorg'), array(get_string('no'), get_string('yes')) ); + + $mform->addElement( + 'select', + 'pchkorg_check_ai', + get_string('pchkorg_check_ai', 'plagiarism_pchkorg'), + array(get_string('no'), get_string('yes')) + ); + $mform->setDefault('pchkorg_check_ai', 1); } } @@ -208,7 +215,8 @@ function plagiarism_pchkorg_coursemodule_edit_post_actions($data, $course) 'pchkorg_include_referenced', 'pchkorg_exclude_self_plagiarism', 'pchkorg_student_can_see_widget', - 'pchkorg_student_can_see_report' + 'pchkorg_student_can_see_report', + 'pchkorg_check_ai' ); $records = $DB->get_records('plagiarism_pchkorg_config', array( @@ -420,7 +428,9 @@ class plagiarism_plugin_pchkorg extends plagiarism_plugin { $action = $apiprovider->get_report_action($filerecord->textid); $reporttoken = $apiprovider->generate_api_token(); $score = $filerecord->score; - if (isset($filerecord->scoreai)) { + $isaienabled = '1' === $pchkorgconfigmodel->get_filter_for_module($cmid, 'pchkorg_check_ai'); + + if (isset($filerecord->scoreai) && $isaienabled) { $title = sprintf( get_string('pchkorg_label_title_ai', 'plagiarism_pchkorg'), $filerecord->textid, diff --git a/version.php b/version.php index 9716a66..122ea1e 100644 --- a/version.php +++ b/version.php @@ -26,9 +26,9 @@ defined('MOODLE_INTERNAL') || die(); if (!isset($plugin)) { $plugin = new stdClass(); } -$plugin->version = 2023060713; +$plugin->version = 2023060812; $plugin->requires = 2020061501; // Requires Moodle 3.9 . -$plugin->release = 'v3.14.1'; +$plugin->release = 'v3.14.2'; $plugin->component = 'plagiarism_pchkorg'; $plugin->maturity = MATURITY_STABLE; $plugin->dependencies = array(