Commit b79f17e6 authored by victor's avatar victor 🙇
Browse files

Merge branch 'MDL-69962-master' of https://github.com/clransom/moodle

parents 178e343a ad7d432e
......@@ -637,11 +637,13 @@ class manager {
$tours = cache::get_matching_tourdata($pageurl);
$matches = [];
$filters = helper::get_all_filters();
foreach ($tours as $record) {
$tour = tour::load_from_record($record);
if ($tour->is_enabled() && $tour->matches_all_filters($PAGE->context, $filters)) {
$matches[] = $tour;
if ($tours) {
$filters = helper::get_all_filters();
foreach ($tours as $record) {
$tour = tour::load_from_record($record);
if ($tour->is_enabled() && $tour->matches_all_filters($PAGE->context, $filters)) {
$matches[] = $tour;
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment