Question

Learning Plan API not assigning courses


Userlevel 2

Hi there,

Recently I’ve been messing around with the Docebo API and trying to enroll users into a learning plan using the endpoint POST /learningplan/v1/learningplans/enrollments. The API enrolls the user into the respected learning plan but the big issue that I am running into is that courses associated with that learning plan are not being assigned. I am sure this has to be a bug or an error on the API’s end. 

 

I would love if anyone can confirm.

Best regards,

Parth


7 replies

Userlevel 7
Badge +3

Did you wait a bit? I have had some delays between enrollment in LP and enrollment into specific courses before. 

Userlevel 2

HI @Bfarkas , 

 

Yes, I’ve tested it multiple times via the API browser, and via code requests through python and JS, and running into the same issue. I am certain this is an issue with the API. I reached out to someone on chat who was also able to replicate the same issue. 

 

Would you be able to check and confirm on your end to see if courses are being assigned when enrolling someone to a learning plan via the API endpoint. It would be awesome to pinpoint the issue from multiple people.

 

Best regards,

Parth

Userlevel 7
Badge +3

I was just looking back at my personal documentation on the one learning plan process I have and it says that I have to enroll into courses too, once in the plan other changes than worked, annoying. This kind of stuff happens a lot in the api though, where containers don’t do all the tasks like they do direct from UI. 

Userlevel 2

@Bfarkas Ahh man, I was hoping that wasn’t the case but I guess it is. Thanks for confirming. I’ll proceed your way with enrolling them into the learning plan first and then the courses.

 

Userlevel 7
Badge +3

Yeah, annoying for maintenance purposes for sure. 

Userlevel 2

For anyone seeing this in the future. I was able to speak with a tier 2 developers from Docebo to get this fixed. Turned out to be a bug. The issue that I was facing was related to enrollment fields. If you have a learning plan with courses that include enrollment fields the api threw no errors and only assigned the learning plan leaving the courses out. 

 

Now there should be an error from the API stating enrollment fields on courses not found.

The expected behavior should be that when assigning a learning plan all the courses associated with that plan are also assigned. 

Hope that helps. 

 

Best regards,

Parth 

Userlevel 7
Badge +3

For anyone seeing this in the future. I was able to speak with a tier 2 developers from Docebo to get this fixed. Turned out to be a bug. The issue that I was facing was related to enrollment fields. If you have a learning plan with courses that include enrollment fields the api threw no errors and only assigned the learning plan leaving the courses out. 

 

Now there should be an error from the API stating enrollment fields on courses not found.

The expected behavior should be that when assigning a learning plan all the courses associated with that plan are also assigned. 

Hope that helps. 

 

Best regards,

Parth 

Thanks for this, the ones I was working on had them on all courses so it always just seemed like it didn't enroll any courses, good to know!

Reply