Skip to content

Commit 2763d16

Browse files
committed
Attendances: Fix variables filtering issues - refs #3093
1 parent 97cf40b commit 2763d16

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main/inc/lib/attendance.lib.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ public function get_users_attendance_sheet(
12361236
DateTime $endDate = null
12371237
) {
12381238
//Get actual course or by course_id
1239-
$course_id = (0 == $course_id) ? api_get_course_int_id() : $course_id;
1239+
$course_id = (0 == $course_id) ? api_get_course_int_id() : (int) $course_id;
12401240
$tbl_attendance_sheet = Database::get_course_table(TABLE_ATTENDANCE_SHEET);
12411241
$tbl_attendance_calendar = Database::get_course_table(TABLE_ATTENDANCE_CALENDAR);
12421242
$attendance_calendar = $this->get_attendance_calendar(
@@ -1481,7 +1481,7 @@ public function get_attendance_calendar(
14811481
$tbl_attendance_calendar = Database::get_course_table(TABLE_ATTENDANCE_CALENDAR);
14821482
$tbl_acrg = Database::get_course_table(TABLE_ATTENDANCE_CALENDAR_REL_GROUP);
14831483
$attendanceId = intval($attendanceId);
1484-
$course_id = (0 == $course_id) ? api_get_course_int_id() : $course_id;
1484+
$course_id = (0 == $course_id) ? api_get_course_int_id() : (int) $course_id;
14851485
$whereDate = '';
14861486
if (!empty($startDate)) {
14871487
$whereDate .= " AND c.date_time >= '".$startDate->format('Y-m-d H:i:s')."'";
@@ -2405,6 +2405,7 @@ public function getCoursesWithAttendance(
24052405
}
24062406

24072407
/* Sessions */
2408+
$studentId = (int) $studentId;
24082409
$sql = "
24092410
SELECT
24102411
session_id,

0 commit comments

Comments
 (0)