Skip to content

Commit

Permalink
Merge pull request #16 from jmcgettrick/qa
Browse files Browse the repository at this point in the history
 Merge Qa branch for release 2015040107
  • Loading branch information
jmcgettrick committed Jul 31, 2015
2 parents 3e35ea1 + 9417759 commit 2807b9b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
9 changes: 6 additions & 3 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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'");
}
2 changes: 1 addition & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2807b9b

Please sign in to comment.