|
|
@ -4293,11 +4293,23 @@ class SessionManager |
|
|
|
{ |
|
|
|
{ |
|
|
|
$table_session_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
|
|
$table_session_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
|
|
$table_session = Database::get_main_table(TABLE_MAIN_SESSION); |
|
|
|
$table_session = Database::get_main_table(TABLE_MAIN_SESSION); |
|
|
|
|
|
|
|
$url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
|
|
$courseId = intval($courseId); |
|
|
|
$courseId = intval($courseId); |
|
|
|
|
|
|
|
$urlId = api_get_current_access_url_id(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($courseId)) { |
|
|
|
|
|
|
|
return []; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$sql = "SELECT name, s.id |
|
|
|
$sql = "SELECT name, s.id |
|
|
|
FROM $table_session_course sc |
|
|
|
FROM $table_session_course sc |
|
|
|
INNER JOIN $table_session s ON (sc.session_id = s.id) |
|
|
|
INNER JOIN $table_session s |
|
|
|
WHERE sc.c_id = '$courseId' "; |
|
|
|
ON (sc.session_id = s.id) |
|
|
|
|
|
|
|
INNER JOIN $url u |
|
|
|
|
|
|
|
ON (u.session_id = s.id) |
|
|
|
|
|
|
|
WHERE |
|
|
|
|
|
|
|
u.access_url_id = $urlId AND |
|
|
|
|
|
|
|
sc.c_id = '$courseId' "; |
|
|
|
$result = Database::query($sql); |
|
|
|
$result = Database::query($sql); |
|
|
|
|
|
|
|
|
|
|
|
return Database::store_result($result); |
|
|
|
return Database::store_result($result); |
|
|
|