dodona
dodona copied to clipboard
Add dolos plagiarism detection
This pull request adds a button to detect plagiarism on the submissions of an activity.
TODO:
- [x] https://github.com/dodona-edu/dolos/issues/1398
- [x] Dolos api should return report frontend url
- [x] Update to new url variable in this pr
- [x] https://github.com/dodona-edu/dolos/issues/1399
I would suggest handling #2503 as a separate pr after this one.
Closes #5338
@rien we should discuss how we want to handle cors
Let me know when you have found the time for the dolos modifications
I'm getting less fond of Dolos downloading arbitrary URL's. We are essentially implementing Server-Side Request-Forgery. Malicious users could exploit this to download any file using a Ghent University server if they can convince Dolos it is a valid ZIP-file.
I think it is much safer if Dodona would POST
the ZIP directly to Dolos after the export has been made. This does require storing the Dolos report URL somehow on the Dodona-side though. @jorg-vr @bmesuere what do you think?
If you still prefer submitting the export URL, I think I will create an allowlist that initially only includes dodona.be
.
I have no strong opinion on this.
@rien, performing a post request from dodona is fine for me. I'll adjust this implementation in dodona
It is not clear for me why Dodona needs to store the report URL in this case?
Update of the sequence diagram
sequenceDiagram
Dodona Front ->> Dodona Back: POST create export
Note over Dodona Back: collect submissions
Dodona Back -->> Dodona Front: export status URL
loop untill ready
Dodona Front -->> Dodona Back: GET export status
Dodona Back -->> Dodona Front: status
end
Dodona Front ->> Dodona Back: POST create report with export ID
Dodona Back ->> Dolos API: POST create report with zip file
Note over Dolos API: download export & start analysis job
Dolos API -->> Dodona Back: report URL
Dodona Back -->> Dodona Front: report URL
Dodona Front ->> Dolos Front: GET report URL
Note over Dolos Front: save report URL in LocalStorage
loop untill ready
Dolos Front ->> Dolos API: GET report status
Dolos API -->> Dolos Front: status
end
Note over Dolos Front: show report
I have added some documentation of the Dolos API on our website: https://dolos.ugent.be/docs/api.html
Dolos will now show a loading page when redirected to the html_url
if the report is not finished yet. You can validate if this PR works and release when ready :tada:
This button is currently on the submissions list page. This is not ideal as it does not interact with the search functionality.
Other possibilities are on the activity information page, or replacing the right chevron with a three dot menu on activity lists.