Student Feedback Serializer/View

Summary

The current StudentInfoSerializer uses the standard FeedbackSerializer. This results in all FeedbackComments and also non final feedback to be serialized.

Steps to reproduce

Whip up a fresh db with make db. Then insert testdata with ./manage.py maketestdata, login with student01 : p and view submissions.

What is the current bug behavior?

  • All Feedbackcomments are serialized
  • non final Feedback is returned

What is the expected correct behavior?

  • only comments whose visible_to_student is set to true should be serialized
  • feedback that is_final = false should not be returned

Possible fixes

  • filter the comments (probably by overriding the queryset on the feedback_lines field)
  • filter the feedbacks in the SubmissionListSerializer (i decided to include non final feedback for the student endpoint but show an alert in the student view should a feedback be non final)
  • write tests verifying the intended behavior
Edited by robinwilliam.hundt