diff --git a/CHANGELOG.md b/CHANGELOG.md index 61bb7ced..645bfa4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ Releases before version 2015040106 will refer to changes made to the Turnitin's other Moodle plugins as well; the direct module and block. +### Date: 2015-July-31 +### Release: v2015040107 + +- Verified against Moodle 2.9 +- Fixes: + - Account for Shared Rubrics being returned by the API. + - Don't show the EULA for files previously submitted to Turnitin. + +--- + ### Date: 2015-June-29 ### Release: v2015040106 diff --git a/db/upgrade.php b/db/upgrade.php index fc35067e..163f7018 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -153,7 +153,7 @@ function xmldb_plagiarism_turnitin_upgrade($oldversion) { upgrade_plugin_savepoint(true, 2014012413, 'plagiarism', 'turnitin'); } - if ($oldversion < 2015040106) { + if ($oldversion < 2015040107) { upgrade_dm_successful_uploads(); } @@ -163,9 +163,12 @@ function xmldb_plagiarism_turnitin_upgrade($oldversion) { function upgrade_dm_successful_uploads() { global $DB, $CFG; - // Update successful submissions from Dan Marsden's plugin + // Update successful submissions from Dan Marsden's plugin with incorrect statuscode. $DB->execute("UPDATE ".$CFG->prefix."plagiarism_turnitin_files SET statuscode = 'success', lastmodified = ".time()." WHERE statuscode = '51'"); - // Update error codes with submissions from Dan Marsden's plugin + // Update the lastmodified timestamp from all successful submissions from Dan Marsden's plugin. + $DB->execute("UPDATE ".$CFG->prefix."plagiarism_turnitin_files SET lastmodified = ".time()." WHERE statuscode = 'success' AND lastmodified = 0"); + + // Update error codes with submissions from Dan Marsden's plugin. $DB->execute("UPDATE ".$CFG->prefix."plagiarism_turnitin_files SET statuscode = 'error' WHERE statuscode != 'success' AND statuscode != 'pending'"); } \ No newline at end of file diff --git a/lib.php b/lib.php index ba770612..453f6c69 100644 --- a/lib.php +++ b/lib.php @@ -703,7 +703,7 @@ public function get_links($linkarray) { $output .= $OUTPUT->box_start('tii_links_container'); // Show the EULA for a student if necessary. - if ($linkarray["userid"] == $USER->id) { + if ($linkarray["userid"] == $USER->id && empty($plagiarismfile->externalid)) { $eula = ""; static $userid; diff --git a/version.php b/version.php index 49e15d1a..88760db5 100644 --- a/version.php +++ b/version.php @@ -5,7 +5,7 @@ * and open the template in the editor. */ -$plugin->version = 2015040106; +$plugin->version = 2015040107; $plugin->release = "2.3+"; $plugin->requires = 2012062500.00; $plugin->cron = 300;