public static function get_matching_tours(\moodle_url $pageurl) {
        global $PAGE;

        $tours = cache::get_matching_tourdata($pageurl);

        foreach ($tours as $record) {
            $tour = tour::load_from_record($record);
            if ($tour->is_enabled() && $tour->matches_all_filters($PAGE->context)) {
                return $tour;
            }
        }

        return null;
    }