danmarsden / moodle-plagiarism_urkund

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

Analyzed report does not show in assignment results #63

Closed thepurpleblob closed 8 years ago

thepurpleblob commented 8 years ago

We've had reports of a few of these. Here's a real example. As it's on our live server it's difficult to debug. Any thoughts?

Database says...

screen shot 2015-12-21 at 14 20 25

Assignment says no...

screen shot 2015-12-21 at 14 23 45

definitely the matching coursemoduleid and userid :(

danmarsden commented 8 years ago

that looks weird... I'd guess that the user uploaded multiple versions of the file and that particular version doesn't match the contenthash in the identifier table? What's the "timesubmitted" value in that plagiarism_urkund_files record? - does it match Monday 21st 2:16pm?

thepurpleblob commented 8 years ago

Good spot...

mysql> select * from mdl_plagiarism_urkund_files where id=45760\G *** 1. row *** id: 45760 cm: 253785 userid: 58054 identifier: 969091f2372d4841149e13855b719f2afad06398 filename: 2151764G.pdf reporturl: https://secure.urkund.com/view/16861881-352337-797289 optout: https://secure.urkund.com/account/document/exemptionstatus/16832850-361280-592789 statuscode: Analyzed similarityscore: 2 attempt: 0 errorresponse: NULL timesubmitted: 1450403235 1 row in set (0.01 sec)

Which, to my calculation, is 18th December.

However they managed this, deleting the file and re-uploading it (even with a different name) seemed to be completely ignored. I might be missing something stupid but there's quite a few that seem to be stuck in this odd state.

danmarsden commented 8 years ago

yeah - it should have created a "new" record with the new file - even if with same or different name but it looks like that has failed - so the new file will not have been sent to URKUND :-( - all my testing suggested that multiple submissions would generate a new record but there must be some edge case that stops that from happening... trying to reproduce this now too.

danmarsden commented 8 years ago

Any chance these files were uploaded using a different process? - eg teacher submitting the file on-behalf or maybe using the mobile app? - I wonder if the event that is supposed to trigger on file upload didn't run so we weren't able to add a record to the events table.

alternatively if the file couldn't be found it may have cleaned up the record in the database assuming that the file had been deleted - but that shouldn't happen if the file exists either.

thepurpleblob commented 8 years ago

I don't think this is a very good example. It seems to have been mucked around with. I touched it last - yesterday - so the time stamp is when I tried to resubmit it.

It's also possible that it was uploaded by the mobile app - we have it enabled but don't officially support it. I've not had a single support call related to it. I don't think anybody really uses it.

danmarsden commented 8 years ago

ok - let me know if you have another example to look at - keep in mind that we still have issue #40 related to teacher submission on behalf - from memory I think that needs a core change but we might be able to handle it better with the new events api if the information is stored properly in the newer events.

thepurpleblob commented 8 years ago

Yep - I think #40 might be the cause of these

danmarsden commented 8 years ago

cool - will close this as we have #40 open - will try to look at that one again in the new year - thanks!