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 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!)