public static function action_category_hide(\core_course_category $category) {
        if (!$category->can_change_visibility()) {
            throw new \moodle_exception('permissiondenied', 'error', '', null, 'core_course_category::can_change_visbility');
        }
        $category->hide();
        return true;
    }