original_string: public static function get_role_ids() {
          $cache = cache::make('tool_uploadcourse', 'helper');
          if (($roles = $cache->get('roles')) === false) {
              $roles = array();
              $rolesraw = get_all_roles();
              foreach ($rolesraw as $role) {
                  $roles[$role->shortname] = $role->id;
              }
              $cache->set('roles', $roles);
          }
          return $roles;
      }
code: public static function get_role_ids() {
          $cache = cache::make('tool_uploadcourse', 'helper');
          if (($roles = $cache->get('roles')) === false) {
              $roles = array();
              $rolesraw = get_all_roles();
              foreach ($rolesraw as $role) {
                  $roles[$role->shortname] = $role->id;
              }
              $cache->set('roles', $roles);
          }
          return $roles;
      }
code_tokens: public static function get_role_ids ( ) { $ cache = cache :: make ( 'tool_uploadcourse' , 'helper' ) ; if ( ( $ roles = $ cache -> get ( 'roles' ) ) === false ) { $ roles = array ( ) ; $ rolesraw = get_all_roles ( ) ; foreach ( $ rolesraw as $ role ) { $ roles [ $ role -> shortname ] = $ role -> id ; } $ cache -> set ( 'roles' , $ roles ) ; } return $ roles ; }
docstring: Return the role IDs.
  
  The result is cached for faster execution.
  
  @return array
docstring_tokens: Return the role IDs .