Commit ad7d432e authored by Katie Ransom's avatar Katie Ransom
Browse files

MDL-69962 tool_usertours: Fix increase in included files

parent 149fdcf0
......@@ -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