compilatio / moodle-plagiarism_compilatio

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

Error when two or more students upload the same file in an assignment #84

Closed jrm-unamur closed 10 months ago

jrm-unamur commented 1 year ago

Hi there, We've encountered an error with plagiarism_compilatio when two or more students upload the same file in an assignment. This error occurs in mod/assign/view.php?id=xxx&action=grading In this case the call to $DB->get_record (line 2667 - lib.php, function compilatio_get_non_uploaded_documents($cmid)) returns more than one record while it should return only one single record. Since the result of this call is just used for at test (if (!$compifile)), I guess the call could simply be replaced with $DB->count_records

Regards

Jean-Roch

benoitcompilatio commented 10 months ago

Hello,

This has been fixed on the 2.7.1 branch (commit) with the count_records

Thank you for the correction