-
Notifications
You must be signed in to change notification settings - Fork 17
Deleted users cause 2108 errors if they are still main teachers #53
Comments
Would it be better to create an event for "user_deleted" which removes/changes the main teacher? |
interesting - I'd be tempted to remove those entries and convert the mainuser to the main moodle admin account instead of continuing to use the old user - any assignments submitted by deleted users should probably just get ignored (if they aren't being ignored already) does that make sense? |
Agree about moving them to the main admin user. Assignments submitted by disabled users should be ignored, only main teachers should be handled. |
using a deleted event would possibly be easier but I'm not sure how reliable that will be. it would be nice to do a check when obtaining the user in turnitin_get_tii_user but that would need a bit more restructuring and it may not be worth it considering we are deprecating this version with the new one that Turnitin have developed. |
That's what I thoughts. It's only happened to us twice and can't see it being much of a problem for the rest of the year as we move off this plugin and v1 to v2. I might just work in the hack to change the email for the remaining months |
makes sense - good to know that this is a potential issue though - thanks! |
We've just encountered this issue - I manually updated the "main teacher" for the affected assignments, and reset the status to 51 so it fetched the missing similarity scores. I've thus been thinking about ways to handle this situation without too much extra effort (given the deprecation)... One option would be to catch the 2108 status code when attempting to retrieve the similarity score/report, and assign a new "main teacher" at that point (trying to pick from course teachers first, if there are none falling back to site admin?) - leaving the status code as 51 so that the next iteration of the cron will try again (without needing to add 2108 to the list of codes to retry). Alternatively, it may be possible to set the new "main teacher" (and then use them) in turnitin_get_tii_user - I haven't looked into what gets passed in to that function (to see whether it receives the cmid and can thus perform the update). |
We had some contractors set up courses and assignments and then their accounts were deleted. This has causes Turnitin to give us 2108 errors where the email address is not valid. The plagiarism plugin uses the main teacher in some parts to talk to TII such as getting scores and updating assignments. As a quick fix, I changed the deleted users email back to what it was which has allowed scores to be pulled down.
Can you have a look at what is below and see if that will work. Best case scenario would be for it to detect a deleted user and either update with an active user. I'm not sure if there are any other parts we need to look at, such as 'username' or 'uid'.
The text was updated successfully, but these errors were encountered: