Browse Source
Merge pull request #570 from pascaleandrei/MOODLE_311_STABLE
Fixed get_courses_with_today_sessions method when there are attendance instances in different days
40-behatfixes
Dan Marsden
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
2 deletions
-
classes/attendance_webservices_handler.php
|
@ -65,11 +65,12 @@ class attendance_handler { |
|
|
$cm->id = $attendance->coursemodule; |
|
|
$cm->id = $attendance->coursemodule; |
|
|
|
|
|
|
|
|
$att = new mod_attendance_structure($att, $cm, $course, $context); |
|
|
$att = new mod_attendance_structure($att, $cm, $course, $context); |
|
|
$course->attendance_instance[$att->id] = array(); |
|
|
|
|
|
$course->attendance_instance[$att->id]['name'] = $att->name; |
|
|
|
|
|
$todaysessions = $att->get_today_sessions(); |
|
|
$todaysessions = $att->get_today_sessions(); |
|
|
|
|
|
|
|
|
if (!empty($todaysessions)) { |
|
|
if (!empty($todaysessions)) { |
|
|
|
|
|
$course->attendance_instance[$att->id] = array(); |
|
|
|
|
|
$course->attendance_instance[$att->id]['name'] = $att->name; |
|
|
$course->attendance_instance[$att->id]['today_sessions'] = $todaysessions; |
|
|
$course->attendance_instance[$att->id]['today_sessions'] = $todaysessions; |
|
|
$coursessessions[$course->id] = $course; |
|
|
$coursessessions[$course->id] = $course; |
|
|
} |
|
|
} |
|
|