danmarsden / moodle-plagiarism_urkund

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

Submitting on behalf of not working in 3.1 #88

Closed thepurpleblob closed 8 years ago

thepurpleblob commented 8 years ago

To reproduce...

The user id in the urkund files table is sensible (it is that of the target student). The same Assignment works as expected when logging in as a student and uploading submissions 'normally'

danmarsden commented 8 years ago

arg... who uses that submit on behalf thing anyway.... ;-)

...I'll take "another" look at it... maybe one day it will be more stable.....

thepurpleblob commented 8 years ago

Yeh, sorry!! It seems our staff use it all the time. What can one do :-D

danmarsden commented 8 years ago

looks like the "easy" option is to keep the plagiarism record using the original userid (admin/teacher) - but this also means that the teacher/admin will get added as the "author" in the urkund report. The Moodle hooks only pass across the file owner and don't pass across any other information that might help us identify the student.

I guess we could add an extra field to the urkund files table that included the "relateduserid" so that when the file is sent it could use the students name but there's a little more work involved there.

danmarsden commented 8 years ago

I've just pushed through a patch that stores the relateduserid in a new field and uses that when needed (sending e-mails, attaching user to file sent to turnitin) - let me know if you manage to test it and get it working.

thepurpleblob commented 8 years ago

That works now... But... it displays as submitted by the teacher in the debug page.

danmarsden commented 8 years ago

ok - I've added some extra text beside the user's name when the file is submitted on behalf for now - I thought about converting it to show the students name but that would throw out the sorting on the page as it will still get sorted by the admins firstname/lastname rather than the students name unless I rewrite the main query to use CASE statements.... which involves a bit more time/effort.... something to look at in future maybe.