OpenLRW icon indicating copy to clipboard operation
OpenLRW copied to clipboard

Remove classSourcedId in Result

Open xchopin opened this issue 5 years ago • 0 comments

Result objects contain a field named "classSourcedId", there is a problem about this.

Context

ClassSourcedId is an attribute of the LineItem objects.

Following the OneRoster structure, a Result is linked to a LineItem and a User.

When creating a Result object, the API expects you to use the following HTTP POST route /classes/:id/results

The value of classSourcedId is gotten by using the URI and then added to the Result object.

Structure issue

First, the used route is already not "OneRoster compatible" since there is no links between Results and Classes (it should have been something like /lineitems/:id/results )

The classSourcedId value is already supposed to be in the LineItem object (following the OneRoster structure).

Production issue

If you PATCH a LineItem and you update its classSourcedId it is not gonna update all the Result objects that are linked to this LineItems, which means this value is going to be wrong for all these objects.

What do you think about it?

xchopin avatar May 03 '19 09:05 xchopin