source-academy / frontend

Frontend of Source Academy, an online experiential environment for computational thinking (React, Redux, Saga, Blueprint)
https://sourceacademy.org
Apache License 2.0
103 stars 166 forks source link

Hide buttons for grading table #3026

Open GabrielCWT opened 3 weeks ago

GabrielCWT commented 3 weeks ago

After some observation, the error messages provided by SA is just the response code e.g. 403. This is causing confusion for Avengers at the start of the semester as the students have not yet been assigned to them and therefore they are unable to unsubmit/unpublish their students' work.

We should be mimicing the permissions on the backend to hide the buttons. e.g. Unpublish -> Assessment is open: User is admin or user is group leader of student. Assessment is closed: User is admin/staff and submission is their own.

Along with hiding of the buttons, we should not be able to click into/grade submissions which are not part of our group

GabrielCWT commented 3 weeks ago

Another potential solution which can be done together with this. The toasts which appear should also show the response message from the backend.