Empty comments can be created which are not deletable, Feedback can be submitted
Summary
When correcting a submission it's possible to create a comment with an empty text, which will be hidden when submitted and thus is not deletable. Furthermore it's possible to create a Feedback with seemingly no comments (because they are hidden) but with a sub full score.
Steps to reproduce
- Go to the correction page
- Click on a line number
- Submit an empty comment
- Submit the feedback (this should not work!)
Example Project
What is the current bug behavior?
- Feedback that has only empty comments is accepted by the backend
- Empty comments are stored and sent to backend by the frontend (not necessary)
What is the expected correct behavior?
- The Backend must validate that there are not only comments, but that their text is also non empty.
Relevant logs and/or screenshots
Possible fixes
-
validate
inFeedbackSerializer
needs to account for empty comments - Frontend should not store comments with empty text