danmarsden / moodle-plagiarism_urkund

Ouriginal plagiarism plugin for Moodle (previously called Urkund)
https://ouriginal.com/
12 stars 19 forks source link

Occasionally get results that don't display #95

Closed thepurpleblob closed 7 years ago

thepurpleblob commented 7 years ago

Here's an example. One submission in the whole assignment doesn't display any Urkund data. Everything looks sensible. Here's what (I think) may be relevant...

screen shot 2016-12-08 at 14 07 26

select * from mdl_files where id=11436456\G 1. row id: 11436456 contenthash: fb44289a1c8212a286e86c807f0d748e2b356eea pathnamehash: e5bee9a5a484d60997971ed9a99b5e65720985e4 contextid: 1026795 component: assignsubmission_file filearea: submission_files itemid: 611095 filepath: / filename: Elearning assignment 1.docx userid: 74518 filesize: 808770 mimetype: application/vnd.openxmlformats-officedocument.wordprocessingml.document status: 0 source: Elearning Eassy final draft.docx author: Amanda Campbell license: allrightsreserved timecreated: 1481134840 timemodified: 1481134845 sortorder: 0 referencefileid: NULL 1 row in set (0.00 sec)

select * from mdl_plagiarism_urkund_files where id=185711\G 1. row id: 185711 cm: 581103 userid: 3 relateduserid: 74518 identifier: fb44289a1c8212a286e86c807f0d748e2b356eea filename: Elearning assignment 1.docx reporturl: https://secure.urkund.com/view/23934357-210046-923626 optout: https://secure.urkund.com/account/document/exemptionstatus/24176389-399847-167624 statuscode: Analyzed similarityscore: 13 attempt: 2

So, a score is returned, the file names are the same, the file hashes are the same but nothing is displayed. Note that it was an ordinary student submission before I attempted to re-submit on their behalf. It made no difference.

danmarsden commented 7 years ago

I'd trace that back to the submission record in the table - 611095 should be the id from the assign_submission table. Then make sure that submission id is the only submission record for that user for that assignment - and that it is the "latest" one.

also when you rollover the link to the file - do the various ids in the path match up with the submission record you see there?

danmarsden commented 7 years ago

presume you've turned debugging on too - there aren't any php errors on that page?

danmarsden commented 7 years ago

also - might be interesting to see if there are many records with the same contenthash in the files table: fb44289a1c8212a286e86c807f0d748e2b356eea

thepurpleblob commented 7 years ago

Cheers! So...

mysql> select * from mdl_assign_submission where id=611095\G
*************************** 1. row ***************************
           id: 611095
   assignment: 18049
       userid: 74518
  timecreated: 1481062056
 timemodified: 1481205779
       status: submitted
      groupid: 0
attemptnumber: 0
       latest: 1
1 row in set (0.00 sec)

Link for uploaded file (in the Assignment screen) is...

http://blah.blah/pluginfile.php/1026795/assignsubmission_file/submission_files/611095/Elearning%20assignment%201.docx?forcedownload=1

There are 11 records for that content hash. They are all 'draft' apart from the one shown above.

There are no errors with debugging on unfortunately (and nothing logged that we can see). Nothing is jumping out at me as obviously wrong :(

It's not something we see a lot of in the great scheme of things but, maybe, once a week we get one that looks something like this so it would be nice to figure out what's going on.

danmarsden commented 7 years ago

thanks - hopefully that will be enough to trace, I'll try to take a look next week and let you know.

danmarsden commented 7 years ago

just found an issue with the submit on behalf stuff - could be related to this issue you had, I've just pushed a patch through to the master branch - let me know if you get a chance to apply it and if it fixes the missing reports.

danmarsden commented 7 years ago

I think this is sorted with the latest version, but let me know if not and we can look again.