crowhill
crowhill

Reputation: 2548

Valence: remove a user from section

So there's this route to enroll a user in a section, but there doesn't seem to be the opposite: a route to unenroll a student from a section.

In fact, there doesn't seem to be a direct route to unenrolling a user from a section from within the LMS itself. I just watched our administrator "unenroll" a student by switching their role in the section to "no role," which, incidentally, isn't a role available via /d2l/api/lp/1.4/roles/.

What am I missing here?

Thanks!

Upvotes: 0

Views: 164

Answers (3)

Clayton Verge
Clayton Verge

Reputation: 1

I think part of the issue is that you are thinking about this from a front end perspective, and not a back end one. The transaction you are looking to do is actually a delete and not an enrollment. It sounds bad because we are trained to see anything with the word delete as bad, but from a data standpoint, there's no such thing as enrollments and drops, you have inserts and deletes.

Upvotes: 0

Viktor Haag
Viktor Haag

Reputation: 3418

Have you tried un-enrolling the student by referring to the section's orgUnitId directly? Perhaps you can try explicitly removing the user from the section's org unit ID, and then, either removing the student's enrollment from the course offering org unit id, or re-enrolling them in another section, as appropriate?

Upvotes: 0

MikingTheViking
MikingTheViking

Reputation: 936

From what I can tell, it definitely seems like that is an oversight in the Valence API. I haven't tried it myself yet, but I wonder if the course offering unenrollment cascades down to the section enrollment also? Naturally that doesn't help solve the problem if you have to unenroll a user from a course offering just to switch their section enrollment within that course offering.

In terms of unenrolling a user from a section within the LMS, this can be accomplished by going into the Section Management within that course offering (Edit Course -> Sections). Then select 'Enrol Users', this will open a table listing the classlist where every section has a column that you can check on/off to enroll/unenroll the user in that specific section (check off more than 1 to enroll in multiple sections).

Upvotes: 0

Related Questions