Another question on the plagiarism tool - Will the tool pick up from where Dan's plugin left off.
For example, If a submission point is succesfully submitted to turnitin and is awaiting similarity score for that assignment, it sets a 'pending' status in the plagiarism_files table. After that point, if we switch to the moodledirectv2 plugin, will it process those files and fetch the similarity score for that assignment.
From what I see in your code , when running the cron() function under plagiarism / turnitin/ lib.php ,
it only looks at entries with the status 'success' ie.
$submissions = $DB->get_records('plagiarism_turnitin_files', array('statuscode' => 'success', 'similarityscore' => null),
'', 'externalid, cm');
Also, when you first add a submission to an assignment that is turnitin enabled, the new plugin adds a statuscode of 'success' and sets the similarity score to NULL which is then picked up by the code above.
I'm just trying to work out how can this fallback to Dan's code that sets the statuscode of a new file to 'pending'