prologin/academie-site

Submission must be submitted through an activity

Rookeur opened this issue · 0 comments

The submission for a problem must be done through the activity.

the current endpoint for a submission run a submission for a given no problem no matter the state of the problem (is it in an activity which belongs to the right teacher, is the activity published or still a draft ...)

In order to avoid that any kind of authenticated user can submit a solution for a problem we want to check that the problem belongs to a published activity (and check the permissions).

The modified endpoint should take as parameter a targeted activity and problem name. If the user can access this activity and it is published so it can submit a solution otherwise an error response should be sent