diff --git a/CHANGELOG.md b/CHANGELOG.md index 82e8cb4..086839d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +### Date: 2021-May-13 +### Release: v2022051301 + +#### :zap: What's new + +--- + +#### Support for Moodle 4.0 + +You can now confidently use Turnitin with Moodle 4.0. + +#### :wrench: Fixes and enhancements + +--- + +#### Submissions will no longer stick on ‘Pending’ + +When ‘Process draft submissions' was selected for an assignment, submissions would appear as stuck on the 'Pending’ status after a student made their final submission to the assignment. + +This bug has been fixed, and the correct submission state will be shown. + +--- + ### Date: 2021-June-01 ### Release: v2021060101 diff --git a/lib.php b/lib.php index 83957a2..bad4012 100644 --- a/lib.php +++ b/lib.php @@ -647,8 +647,8 @@ public function submission_handler($eventdata) { $submissions = $DB->get_records_select( 'plagiarism_turnitinsim_sub', - 'cm = ? AND userid = ? AND itemid = ? AND status != ?', - array($cm->id, $author, $itemid, TURNITINSIM_SUBMISSION_STATUS_EULA_NOT_ACCEPTED) + 'cm = ? AND userid = ? AND itemid = ? AND status NOT IN (?, ?)', + array($cm->id, $author, $itemid, TURNITINSIM_SUBMISSION_STATUS_EULA_NOT_ACCEPTED, TURNITINSIM_SUBMISSION_STATUS_COMPLETE) ); foreach ($submissions as $submission) { diff --git a/version.php b/version.php index 365cb19..f270197 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2021060101; +$plugin->version = 2022051301; $plugin->release = "v1.2"; $plugin->requires = 2017051500; $plugin->component = 'plagiarism_turnitinsim';