From 4347815d8885c2e4d7b224233604e3f24de08557 Mon Sep 17 00:00:00 2001 From: Ferenc 'Frank' Lengyel <151741255+Ferenc-Frank-Lengyel@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:59:21 +0100 Subject: [PATCH] get active (visible) courses only --- locallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locallib.php b/locallib.php index 3e65a452a1..1f3c9ff5f5 100644 --- a/locallib.php +++ b/locallib.php @@ -207,7 +207,7 @@ function attendance_get_user_sessions_log_full($userid, $pageparams) { function attendance_get_user_courses_attendances($userid) { global $DB; - $usercourses = enrol_get_users_courses($userid); + $usercourses = enrol_get_users_courses($userid, true); list($usql, $uparams) = $DB->get_in_or_equal(array_keys($usercourses), SQL_PARAMS_NAMED, 'cid0');