original_string: public static function action_category_resort_subcategories(\core_course_category $category, $sort, $cleanup = true) {
          if (!$category->can_resort_subcategories()) {
              throw new \moodle_exception('permissiondenied', 'error', '', null, 'core_course_category::can_resort');
          }
          return $category->resort_subcategories($sort, $cleanup);
      }
code: public static function action_category_resort_subcategories(\core_course_category $category, $sort, $cleanup = true) {
          if (!$category->can_resort_subcategories()) {
              throw new \moodle_exception('permissiondenied', 'error', '', null, 'core_course_category::can_resort');
          }
          return $category->resort_subcategories($sort, $cleanup);
      }
code_tokens: public static function action_category_resort_subcategories ( \ core_course_category $ category , $ sort , $ cleanup = true ) { if ( ! $ category -> can_resort_subcategories ( ) ) { throw new \ moodle_exception ( 'permissiondenied' , 'error' , '' , null , 'core_course_category::can_resort' ) ; } return $ category -> resort_subcategories ( $ sort , $ cleanup ) ; }
docstring: Resorts the sub categories of the given category.
  
  @param \core_course_category $category
  @param string $sort One of idnumber or name.
  @param bool $cleanup If true cleanup will be done, if false you will need to do it manually later.
  @return bool
  @throws \moodle_exception
docstring_tokens: Resorts the sub categories of the given category .