mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-69962 tool_usertours: Fix increase in included files
This commit is contained in:
parent
149fdcf075
commit
ad7d432ebe
1 changed files with 7 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue