by Séverin TERRIER.
Hi,
I'd say that this is a (good) solution to backup courses of a category (strictly).
But if you also want to backup all courses of all subcategories, you should adapt the initial select query to :
I'd say that this is a (good) solution to backup courses of a category (strictly).
But if you also want to backup all courses of all subcategories, you should adapt the initial select query to :
SELECT c.id, c.category, c.fullnameFROM mdl_course cJOIN mdl_course_categories cc ON c.category = cc.idWHERE cc.id = 43 OR cc.path LIKE '%/43/%';If you use moosh, you could use the course-list command to obtain all course's id from a category and it's sub-categories with a simple command :
moosh course-list -i -c 43Séverin