SakaiGrader fails to save grade when using peer review with feedback attachment

Description

When an instructor is grading a submission that is using Peer Review feature and the student reviewer submitted a feedback via an attachment the following error occurs in the log.

 

Attachments

2

Activity

Show:

Andrea Schmidt January 9, 2025 at 2:58 PM

This was tested as part of on 23x: https://qa23-maria.nightly.sakaiproject.org/, build: dcb4ca36, and instructor grading works and releasing the grade does send the grade to the GB

Earle Nietzel January 7, 2025 at 7:54 PM

Now that is settled setting this back to Resolved/Verified

Andrea Schmidt November 4, 2024 at 11:13 PM
Edited

Tested on 25x: https://trunk-maria.nightly.sakaiproject.org/, build: 08c83636

There are several issues with the Sakai Grader:

  • Clicking on a student’s name and then clicking on the reviewer’s attachment loads the attachment in the same window

  • Clicking on a student’s name on the Submissions page (other than the first student) ends up with a 500 error

What is working:

  • Clicking on a reviewer’s name does open the attachment in a new window when clicked

  • Clicking any reviewer other than the first one loads the page as expected

Classic Grader:

  • The grading page for the instructor does not include the reviewer’s file/comments - only the grade - and I’m not sure if it’s expected on the page

  • The classic grader does load the page if the instructor clicks any student other than the first one

 

Sakai Grader console errors:

 

Server logs (same errors regardless if using Edge or Firefox:

Automation for Jira October 31, 2024 at 8:07 PM

A pull request has been created, "SAK-50660 SakaiGrader fails to save grade when using peer review with feedback attachment", you can see it at https://github.com/sakaiproject/sakai/pull/13001

Earle Nietzel October 31, 2024 at 8:04 PM

The issue here was the use of org.sakaiproject.assignment.api.model.PeerAssessmentItem#attachmentRefList which is a list of Reference. When EntityBroker attempts to encode the response for the action setGrade it uses reflection to introspect the Reference and it ultimately loads the content of the feedback file and attempts to serialize it.

See the following code snippet:

java.util.ImmutableCollections$MapN byte is an array true
Exception in thread "main" java.lang.ClassCastException: class [B cannot be cast to class [Ljava.lang.Object; ([B and [Ljava.lang.Object; are in module java.base of loader 'bootstrap')

The solution was to remove the Reference objects from the response so they are not introspected.

Fixed

Details

Priority

23 Status

QA Verification Pass

Components

Assignee

Reporter

Created October 31, 2024 at 7:52 PM
Updated January 9, 2025 at 2:59 PM
Resolved January 7, 2025 at 7:49 PM