Add possibility to UNenroll students from class even if students are archived

Add possibility to UNenroll students from class even if students are archived

As per my ticket I sent, this is kinda problematic for us, since we are working through API, and not always the same person dealing with UNenrollements / Archiving... Please see below:

----
Hello,

Running into an issue on our production environment with API V3 and batch UNenrollments of students.

We're calling a

PATCH on for {{baseURL}}/courses/{classid}/learners/batch

with a BODY of something like:

[
    {
        "id"28293456,
        "attributes": {
            "unenrolled"true
        }
    },
    {
        "id"6788528,
        "attributes": {
            "unenrolled"true
        }
    }
]

It seems that it fails to UNenroll students that got archived right before unenrollments, because it fails to find the student object. Example, inspecting the batchID received:

{
    "id"789,
    "user_id"2459781,
    "http_method""PATCH",
    "uri""courses/1364602/learners/batch",
    "api_key_id"13546,
    "request""[{\"id\":6788528,\"attributes\":{\"unenrolled\":true}}]",
    "options""{}",
    "results": [
        {
            "object": {
                "message""Cannot resolve object with ID 6788528"
            },
            "status_code"404,
            "status_message""Not Found"
        }
    ],
    "status""Finished",
    "created_at""2024-09-20T11:09:53.000+09:00",
    "started_at""2024-09-20T11:09:56.000+09:00",
    "finished_at""2024-09-20T11:09:56.000+09:00",
    "processed"1
}

How can we resolve this quickly, without the need to FIRST unenroll and THEN archive student object? It isn't always the same person taking care of UNenrolling VS Archiving the students... Is it possible to resolve this?

Much thanks for your prompt reply. Appreciated.

Regards,
Patrick