MDL-31502 Check whether a category has subcategories or courses within it before...