diff --git a/main/admin/add_courses_to_session.php b/main/admin/add_courses_to_session.php index 216a7f3152..b6b6e52a9f 100755 --- a/main/admin/add_courses_to_session.php +++ b/main/admin/add_courses_to_session.php @@ -172,13 +172,14 @@ if ($ajax_search) { $result = Database::query($sql); $Courses = Database::store_result($result); foreach ($Courses as $course) { - if ($course['id_session'] == $sessionId) { + if ($course['session_id'] == $sessionId) { $sessionCourses[$course['id']] = $course ; } else { $nosessionCourses[$course['id']] = $course ; } } } + unset($Courses); ?>