public static function action_category_change_sortorder_up_one(\core_course_category $category) {
        if (!$category->can_change_sortorder()) {
            throw new \moodle_exception('permissiondenied', 'error', '', null, 'core_course_category::can_change_sortorder');
        }
        return $category->change_sortorder_by_one(true);
    }