Skip to content

Grade Change Log (assignment.get_grade_change_events()) discards "linked" data #709

@hthallam

Description

@hthallam

Describe the bug

When calling assignment.get_grade_change_events(), the linked section of the API response is discarded which contains sideloaded data. This helps resolve identifiers such as sis_user_id without making additional API calls.

The Grade Change Log API returns a compound document structure:

{
    "links": {},
    "events": [],
    "linked": {
        "users": [...],
        "courses": [...],
        "assignments": [...]
    }
}

While _root='events' correctly extracts iterable results, the linked data is thrown away in PaginatedList._get_next_page().

To Reproduce

Steps to reproduce the behavior:

Make a call to assignment.get_grade_change_events() after substituting a valid assignment_id and inspect the returned data.

Expected behavior

The method should preserve access to the page-level linked data instead of discarding it when extracting the root collection (events)

Environment information

  • Python version 3.11.14
  • CanvasAPI version 3.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions