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;
    }
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;
    }
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 ; }
Fetch the tour data for the specified tour.

@param   int         $tourid         The ID of the tour to fetch steps for
Fetch the tour data for the specified tour .