AnsweredAssumed Answered

Getting Course Memberships including disabled enrollments

Question asked by cf26721 on Apr 25, 2017
Latest reply on May 24, 2017 by cf26721

I hope that I I'm missing something rather simple, but I'm having a hard time getting back a list of course memberships, by user, including any disabled enrollments.  Two of the three approaches I've taken only return enabled (course_users.row_status = 0) enrollments, but I need to pull back ALL enrollments.


Works - EnrollmentLoader.load(Enrollment e)

Doesn't Work - CourseMembershipDbLoader.loadByUserId(Id userId)

Doesn't Work - REST API (/learn/api/public/v1/users/<userid>/courses)


I'm trying to move away from the EnrollmentLoader, as I need to modify the availablity/row status, and the EnrollmentPersister is deprecated, and I'd rather not have to have a hybrid solution (EnrollmentLoader to load the data, and REST or CourseMembershipDbLoader to persist).