teammates
teammates copied to clipboard
Warning message for potentially destructive edits of questions not shown under specific conditions
- Environment: v8.16.1
Steps to reproduce
- Open the edit session page of an open session as instructor. The session currently has no responses.
- Student responds to feedback question and submits their response.
- Instructor makes a destructive edit (without refreshing the edit page). For example, changing visibility, or changing options of mcq question.
Expected behaviour Modal with warnings should still be shown
Actual behaviour Responses are deleted without any warning
Additional info
Warnings are skipped because of an additional check for whether there are any existing responses.
https://github.com/TEAMMATES/teammates/blob/2fc791c1befbd1ed529556416c827171452ce593/src/web/app/components/question-edit-form/question-edit-form.component.ts#L284
However, isQuestionHasResponses
is not updated between the time the instructor first loads the page and the time when the edited question is saved.
While this is unlikely, it is not implausible. For example, imagine an instructor who does not have the habit of closing tabs. He is informed of a minor typo in MCQ question at the start of the session, and proceeds to correct it resulting in the above situation (past responses being deleted silently).
Suggestion Add stricter checks for whether a session is already opened (there might be potential responses). If not possible, I believe the benefit of removing this check (potential silent deletion of responses) outweighs any potential minor annoyance to instructors.
Add stricter checks for whether a session is already opened (there might be potential responses). If not possible, I believe the benefit of removing this check (potential silent deletion of responses) outweighs any potential minor annoyance to instructors.
Yes, good to do if the cost is low, but OK to leave as is if not.
hi, I would like to attempt to take on this issue, thanks!
hi, I would like to attempt to take on this issue, thanks!
Sure, you're welcome to try!