turnitin / moodle-plagiarism_turnitin

Turnitin Plagiarism plugin for Moodle
http://www.turnitin.com
GNU General Public License v3.0
46 stars 69 forks source link

Does not update 'grader' field in 'mdl_assignment_grades' record. #602

Closed thepurpleblob closed 2 years ago

thepurpleblob commented 2 years ago

We noticed this because we have a custom report that shows the grader. Often, if Turnitin has been used for grading there is no grader recorded.

This is one way to reproduce this but I'm quite sure that the assignment_grades records can be produced by Assignment in a number of other scenarious

Analysis. The plagiarism plugin code checks if there is already an entry for this grade when updating. If there is it only updates the grade and not the grader. It only writes the grader id if there is no entry at all. It should also update the record with the id of the grader.

thepurpleblob commented 2 years ago

Should have added...

See, https://github.com/turnitin/moodle-plagiarism_turnitin/blob/58b088b1fb12b3dd516bc40fa9b321ac7abad727/lib.php#L1533-L1553

The grader id should be updated regardless of the value of $currentgrade, not just the grade. I guess somebody was avoiding checking for assignment/workshop in the $currentgrade==true condition ;-)

dwinn commented 2 years ago

Hi @thepurpleblob,

Thank you for the bug report. I have been able to reproduce this on our end so I have created a bug ticket on our system.

dwinn commented 2 years ago

Hi @thepurpleblob This has been fixed in version 2022032301 today.