canvas-lms/app/views/submissions
Adrian Packel 8569579f87 Fix comment visibility on submission details page
Show the comment sidebar on the submission details page when a student
is viewing their own submission (even if the assignment is muted or
anonymous). Also, when a teacher (or admin) is viewing a student's
submission, always show all relevant comments, as opposed to
mistakenly hiding all non-student comments when the page first loads.

fixes GRADE-1304

Test plan:
- Create an assignment (do not enable anonymous or moderated) and mute it
  - As a student, leave some comments on the assignment via the submission
    details page
  - As a teacher, leave some comments on the student's assignment (via
    either SpeedGrader or the submission details page)
  - Check comment visibility for both users:
    - The student should be able to see their own comments but not the
      teacher's comments
    - The teacher should be able to see all comments
  - Unmute the assignment
    - The student should now be able to see the teacher's comments

- Create an anonymous assignment (it will be muted automatically)
  - Ensure that the student has regained the ability to leave comments
    on the submission details page
  - Check that comment visibility generally works as specified above
    (aside from the comments now being anonymous)

Change-Id: I541345d335bccd2cfb6587db44850ae51371d326
Reviewed-on: https://gerrit.instructure.com/159255
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-08-06 16:19:47 +00:00
..
_submission_download.html.erb da licença part 55 2017-04-28 19:42:23 +00:00
show.html.erb Fix comment visibility on submission details page 2018-08-06 16:19:47 +00:00
show_preview.html.erb make anonymous grading checks consider muted status 2018-07-10 16:24:26 +00:00