danmarsden / moodle-plagiarism_urkund

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

Improve receiver address workflow #131

Closed danmarsden closed 4 years ago

danmarsden commented 4 years ago

The receiver address basically "groups" the assignment into a specific account within urkund, but once created, an assignment usually stays allocated to that specific reciever address.

Few things to be aware of in terms of existing handling of the reciever address. The site admin can set a "default" receiver address to use on new assignments. The users own last used reciever address is stored /cached in their own user preferences. eg - when creating a new assignment, it checks if this user has a reciever address in their preferences - if yes, it uses this address. If no, it uses the site default setting.

New behaviour:

If we get a response to say a receiver does not exist this flow is followed: 3a Send a create receiver request to Urkunds API for the email that the user has in Moodle. 3b Wait for Urkunds API to respond back with the newly created receiver object

3ba Urkunds API can in some cases respond back with http status code “403 – Forbidden”. If that happens an error should be displayed to the user stating that they need to manually enter an analysis address

Ideally we want to make this as seemless as possible, so a combination of ajax calls and other checks in the validation function would be good.