turnitin/moodle-plagiarism_turnitin

update_grade() method should use Moodle API

micaherne opened this issue · 3 comments

The method plagiarism_plugin_turnitin::update_grade() that is ultimately called when a grade is received from Feedback Studio is doing a simplistic process with direct database manipulation. This is not sufficient for compatibility with Moodle and should instead be using the Moodle API (specifically assign::save_grade() for mod_assign)

The specific issue I am encountering is that feedback plugins are not having their callbacks called, so are unable to process the new grade. Everywhere in core Moodle where assignment grades are saved or updated results in these being called.

There are a host of other issues though, for example:

  • outcomes are not processed
  • submission_graded events are not triggered (so there is no logging - I think this is #426)
  • marking workflow is not updated correctly
  • student notifications of grading are not sent, if enabled in the assignment settings
  • submissions aren't reopened if the grade is a fail and automatic resubmission is enabled in the assignment settings

It's also possible that moving to assign::save_grade() would simplify the code as it deals transparently with things like team submissions

Hi micaherne
We are seeing similar problems to those you report in this plugin. What is the version of the plugin you are commenting on please ? We are using 2019070201 and wondering if these issues persist in 2019121701

Just to give this a bump but in 2022 it still seems that the TII plugin does not use the mod-assign API for grades and is still writing directly to the assign_grades table in the update_grades() function:

private function update_grade($cm, $submission, $userid) {

where it does a $DB->update_record($table, $grade)
($table is basically a reference to "assign_grades" as found in the turnitin_assign.class.php)

So TII is still bypassing all of the Moodle's assignment grade sub-systems, which implements an "update_grades()" function that can be publicly called to do everything correctly, including checking blind marking, marking workflow and team grading and doesn't rely on Turnitin replicating all of this logic.

Thank you for reporting this. Because the latest version of the plagiarism plugin is supported for versions of Moodle 4.1 and higher, I am closing this ticket. However, if you find this issue is occurring with the latest version of the plugin in any of the supported Moodle versions, please create a new ticket and we will address it.