Best Answer

Unassign a Course from ALL Learning Pathways

  • 26 March 2024
  • 4 replies
  • 47 views

Is there a way to unassign a course from all learning pathways?

Currently, I can only see how to unassign a course from a learning pathway one at a time, and there is no ‘select all’ option.

I need to remove a course from over 100+ learning pathways.

Any ideas on the best way to complete this?

icon

Best answer by Ian 28 March 2024, 16:29

View original

4 replies

Userlevel 2

@Katie Cassidy you could unpublish it and that would remove it from all pathways. 

 

Userlevel 5
Badge

@Katie Cassidy you could unpublish it and that would remove it from all pathways. 

 

Having tried this in our sandbox, this is not the case. The course is still in the learning plan.

 

I’ve looked in the API and can’t find a specific way to do this either.

 

If you don’t need to keep the enrolment data, you could duplicate the course, then delete the old one, as the new one will not be in the learning plans.

 

 

Userlevel 4
Badge +1

How comfortable are you, @Katie Cassidy, with using APIs? There are a couple of API endpoints that could be used to achieve this:

  • Returns learning plans related to the given course
    GET    /course/v1/courses/{id}/lp
  • Remove learning plan from a course
    DELETE    /course/v1/courses/{course_id}/lp/{lp_id} 

The general logic would be to get all the learning plan IDs via the GET request to the first endpoint, then cycle through them all with 100+ DELETE requests to the second endpoint.

Note: GET requests are harmless and a good way to familiarise yourself with API endpoints in general. DELETE requests are the opposite: they are destructive and can be unforgiving, so proceed with caution!

Not a particularly difficult job for a developer. For the layperson, it becomes a bit easier to manage if you have Docebo Connect (or perhaps Power Automate; see the wonderful guides written by @Bfarkas).

But if you’re new to this, and you need this done in a hurry, I’d honestly just make a cup of coffee, maybe queue up your favourite podcast, and click the unassign button on the course edit “Learning Plans” tab 100+ times. It’ll be boring but still faster than learning to use the API from scratch.

Userlevel 5
Badge

I haven’t found a solution for that. If you are just removing a course, it is per Learning Plan.

In our Learning Plan description, we provide HTML details of the courses involved. When remove or substitute a course we update the description.

If we are archiving a course, we then remove it from all Catalogs and Learning Plans, and archive the enrollments.

 

Reply