CodeGrade / hourglass

Web-based exam server.
12 stars 4 forks source link

Back navigation and Delete-version button can cause data hazard #430

Open blerner opened 1 year ago

blerner commented 1 year ago

We disable the Delete-version button once students start taking that version of the exam. But if a professor navigates to the proctoring page, say, there's no way back to the exam page other than the browser's Back button...at which point the page restores with a Delete-version button that's still enabled.

We need to rethink page navigation somewhat thoroughly, from a usability perspective, but this is the first instance where I've seen a data hazard. (Fortunately, https://github.com/CodeGrade/hourglass/blob/master/app/graphql/mutations/destroy_exam_version.rb#L37 ensures that the mutation shouldn't allow the version to be destroyed, but that's a risky last line of defense!)

blerner commented 7 months ago

Added a confirmation to all Delete-version buttons in 8a802285