compilatio / moodle-plagiarism_compilatio

Compilatio.net plagiarism plugin for Moodle
4 stars 9 forks source link

send task failed with an empty filename record #79

Closed legrave closed 1 year ago

legrave commented 1 year ago

Bonjour,

We have a record in plagarism_compilato_files with no filename who crash send task : Scheduled task failed: Envoie les fichiers à Compilatio.net pour détection de plagiat (plagiarism_compilatio\task\send_files),Call to undefined method stdClass::get_filename()

The identifier don't have a record in moodle files table, but it was first detect as a tempory file (file_exists, line 1324 in lib.php), so passed as a tmpfile in compilatio_send_file_to_compilatio but tmpfile stdclass's object do'nt have get_filename() method like moodle file class. So 'send task' crash on line 1792. $filename = (!empty($file->filename)) ? $file->filename : $file->get_filename();

Best regards

compilatio commented 1 year ago

Hello, This issue has been fixed in the last version of the plugin : 2.6.14.