original_string: public static function get_stepdata($tourid) {
          global $DB;
  
          $cache = \cache::make('tool_usertours', self::CACHENAME_STEP);
  
          $data = $cache->get($tourid);
          if ($data === false) {
              $sql = <<<EOF
                  SELECT s.*
                    FROM {tool_usertours_steps} s
                   WHERE s.tourid = :tourid
                ORDER BY s.sortorder ASC
  EOF;
  
              $data = $DB->get_records_sql($sql, ['tourid' => $tourid]);
              $cache->set($tourid, $data);
          }
  
          return $data;
      }
code: public static function get_stepdata($tourid) {
          global $DB;
  
          $cache = \cache::make('tool_usertours', self::CACHENAME_STEP);
  
          $data = $cache->get($tourid);
          if ($data === false) {
              $sql = <<<EOF
                  SELECT s.*
                    FROM {tool_usertours_steps} s
                   WHERE s.tourid = :tourid
                ORDER BY s.sortorder ASC
  EOF;
  
              $data = $DB->get_records_sql($sql, ['tourid' => $tourid]);
              $cache->set($tourid, $data);
          }
  
          return $data;
      }
code_tokens: public static function get_stepdata ( $ tourid ) { global $ DB ; $ cache = \ cache :: make ( 'tool_usertours' , self :: CACHENAME_STEP ) ; $ data = $ cache -> get ( $ tourid ) ; if ( $ data === false ) { $ sql =  <<<EOF
                  SELECT s.*
                    FROM {tool_usertours_steps} s
                   WHERE s.tourid = :tourid
                ORDER BY s.sortorder ASC
  EOF ; $ data = $ DB -> get_records_sql ( $ sql , [ 'tourid' => $ tourid ] ) ; $ cache -> set ( $ tourid , $ data ) ; } return $ data ; }
docstring: Fetch the tour data for the specified tour.
  
  @param   int         $tourid         The ID of the tour to fetch steps for
docstring_tokens: Fetch the tour data for the specified tour .