Skip to content

Commit fd36a2b

Browse files
authored
Merge pull request #618 from turnitin/develop
Release 2022032301
2 parents 58b088b + c84eafe commit fd36a2b

File tree

4 files changed

+35
-2
lines changed

4 files changed

+35
-2
lines changed

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
### Date: 2022-March-23
2+
### Release: 2022032301
3+
4+
#### :wrench: Fixes and enhancements
5+
6+
#### Grader field previously not updating correctly - now resolved
7+
8+
We’ve fixed an issue that was occasionally causing the grader field in Moodle assignments to not update correctly.
9+
10+
#### Submission failure relating to Moodle Quiz items resolved
11+
12+
A bug was discovered that was causing submissions to fail. This was found to be linked to Moodle Quiz items. This issue has been resolved.
13+
14+
This fix was submitted as a pull request by [@nwp90](https://github.com/nwp90) on Github. Thanks, Nick!
15+
16+
---
17+
118
### Date: 2021-September-15
219
### Release: 2021091501
320

@@ -19,6 +36,8 @@ Thanks to Dan Marsden And Alex Morris for highlighting and providing a fix for t
1936

2037
Previously, Test Connection wouldn’t work until the plugin was configured. This could potentially cause confusion with users assuming that as no error had been shown the connection must already be established. We’ve changed it so that the Test Connection feature will always look to see if a successful connection has been made when checking.
2138

39+
---
40+
2241
### Date: 2021-August-13
2342
### Release: 2021081301
2443

@@ -27,6 +46,8 @@ Previously, Test Connection wouldn’t work until the plugin was configured. Thi
2746
#### Classes will create successfully
2847
A bug potentially resulted in classes created in Moodle to not sync correctly when we tried to create them in Turnitin. We’ve fixed this problem and you will now be able to create classes again.
2948

49+
---
50+
3051
### Date: 2021-June-08
3152
### Release: 2021060801
3253

lang/en/plagiarism_turnitin.php

+1
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@
260260
$string['errorcode10'] = 'This file has not been submitted to Turnitin because there is a problem creating the class in Turnitin which is preventing submissions, please consult your API logs for further information';
261261
$string['errorcode11'] = 'This file has not been submitted to Turnitin because it is missing data';
262262
$string['errorcode12'] = 'This file has not been submitted to Turnitin because it belongs to an assignment in which the course was deleted. Row ID: ({$a->id}) | Course Module ID: ({$a->cm}) | User ID: ({$a->userid})';
263+
$string['errorcode14'] = 'This file has not been submitted to Turnitin because the attempt it belongs to could not be found';
263264
$string['queued'] = 'Queued';
264265
$string['updatereportscores'] = 'Update Report Scores for Turnitin Plagiarism Plugin';
265266
$string['sendqueuedsubmissions'] = 'Send Queued Files from the Turnitin Plagiarism Plugin';

lib.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -1532,6 +1532,11 @@ private function update_grade($cm, $submission, $userid) {
15321532

15331533
if ($currentgrade) {
15341534
$grade->id = $currentgrade->id;
1535+
1536+
if ($cm->modname == 'assign') {
1537+
$grade->grader = $USER->id;
1538+
}
1539+
15351540
$return = $DB->update_record($table, $grade);
15361541
} else {
15371542
$grade->userid = $userid;
@@ -3133,7 +3138,13 @@ function plagiarism_turnitin_send_queued_submissions() {
31333138
}
31343139

31353140
require_once($CFG->dirroot . '/mod/quiz/locallib.php');
3136-
$attempt = quiz_attempt::create($queueditem->itemid);
3141+
try {
3142+
$attempt = quiz_attempt::create($queueditem->itemid);
3143+
} catch (Exception $e) {
3144+
plagiarism_turnitin_activitylog(get_string('errorcode14', 'plagiarism_turnitin'), "PP_NO_ATTEMPT");
3145+
$errorcode = 14;
3146+
break;
3147+
}
31373148
foreach ($attempt->get_slots() as $slot) {
31383149
$qa = $attempt->get_question_attempt($slot);
31393150
if ($queueditem->identifier == sha1($qa->get_response_summary())) {

version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* @copyright 2012 iParadigms LLC
2020
*/
2121

22-
$plugin->version = 2021091501;
22+
$plugin->version = 2022032301;
2323
$plugin->release = "3.5+";
2424
$plugin->requires = 2018051700;
2525
$plugin->component = 'plagiarism_turnitin';

0 commit comments

Comments
 (0)