MDL-52777 tool_usertours: Only return tours with steps

This commit is contained in:
Andrew Nicols
2016-10-20 13:44:18 +08:00
parent c4d5fb53ce
commit 55dba8058f
+1 -1
View File
@@ -579,7 +579,7 @@ EOF;
foreach ($tours as $record) {
$tour = tour::load_from_record($record);
if ($tour->is_enabled() && $tour->matches_all_filters($PAGE->context) && $tour->get_steps() > 0) {
if ($tour->is_enabled() && $tour->matches_all_filters($PAGE->context) && $tour->count_steps() > 0) {
return $tour;
}
}