Low performance when deleting courses in bulk

Low performance when deleting courses in bulk

by Ricardo Caiado -
Number of replies: 3
Picture of Particularly helpful Moodlers
Hi,

The only way I know of to remove multiple courses is to put them in a category and then remove that category.

However, this process has been very slow and many times it gives me a "timeout" errr message. I currently need to remove a category with +10k courses.

Is there any other option to remove a large number of courses faster? Maybe using CLI?

Ricardo
Average of ratings: -
In reply to Ricardo Caiado

Re: Low performance when deleting courses in bulk

by Alain Raap -
Picture of Particularly helpful Moodlers
Hi Ricardo,

Maybe Moosh could be a solution for your problem? Check command 'course-delete' here: https://moosh-online.com/commands/
You could write a script that deletes all the courses you want to be removed.
Average of ratings: Useful (2)
In reply to Alain Raap

Re: Low performance when deleting courses in bulk

by Ricardo Caiado -
Picture of Particularly helpful Moodlers
Alain,

Thanks for the tip!

I will try it.

Ricardo
In reply to Alain Raap

Re: Low performance when deleting courses in bulk

by Ricardo Caiado -
Picture of Particularly helpful Moodlers
Alain,

Passing by just to let you know that Moosh works like a charm.

Thank you!

Ricardo
Average of ratings: Useful (2)