instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.52k stars 2.45k forks source link

Discussion peer review banner shows incorrect due date #2058

Open va7map opened 2 years ago

va7map commented 2 years ago

Summary: Discussion peer review banner shows incorrect due date

Steps to reproduce:

  1. As a teacher, create a new discussion topic: check Graded and Require Peer Reviews
  2. Set Due date to some future date, and Until date a few hours after Due date
  3. Under Peer Reviews, select Automatically Assign Peer Reviews
  4. Set Reviews Per User to 1 or higher
  5. Set Assign Reviews to any date between the Due and Until dates
  6. As a student, access the discussion topic after peer reviews were assigned

Expected behavior:

The student should see they've been assigned a peer review, and when that review is due by.

Actual behavior:

The student saw they've been assigned a peer review, but the due date shown is actually the date when the review was assigned by Canvas, not when it's due.

Additional notes:

In the following screenshot, the discussion was due at 12:30pm, peer reviews were assigned at 1:00pm, and the assignment will be available until 11:59pm the same day. Peer reviews shouldn't be "due" at 1:00pm.

screenshot

This appears to be a very old issue in which Assignment#peer_reviews_due_at was used internally to assign peer reviews rather than to determine when they were due from students. There's been an attempt to clarify the role of the column (f71b0b48087e28602a1ed98f42d7e620bcb8442d), but the peer review banner still incorrectly uses it as the due date.