|
|
|
|
@ -93,6 +93,7 @@ if (count($sessions) > 0) { |
|
|
|
|
$header[] = array (get_lang('Status'), true); |
|
|
|
|
$header[] = array ('', false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($sessions as $session_item) { |
|
|
|
|
|
|
|
|
|
$data = array (); |
|
|
|
|
@ -104,17 +105,40 @@ if (count($sessions) > 0) { |
|
|
|
|
$row = array(); |
|
|
|
|
$row[] = $my_course['code']; |
|
|
|
|
$row[] = $course_info['title']; |
|
|
|
|
$row[] = $my_course['status'] == STUDENT ? get_lang('Student') : get_lang('Teacher'); |
|
|
|
|
$sessionStatus = SessionManager::get_user_status_in_session($user['user_id'], $my_course['code'], $id_session); |
|
|
|
|
$status = null; |
|
|
|
|
|
|
|
|
|
switch($sessionStatus) { |
|
|
|
|
case STUDENT: |
|
|
|
|
$status = get_lang('Student'); |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
$status = get_lang('CourseCoach'); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$tools = '<a href="course_information.php?code='.$course_info['code'].'&id_session='.$id_session.'">'.Display::return_icon('synthese_view.gif', get_lang('Overview')).'</a>'. |
|
|
|
|
'<a href="'.api_get_path(WEB_COURSE_PATH).$course_info['path'].'?id_session='.$id_session.'">'.Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>'; |
|
|
|
|
$row[] = $status; |
|
|
|
|
|
|
|
|
|
$tools = '<a href="course_information.php?code='.$course_info['code'].'&id_session='.$id_session.'">'. |
|
|
|
|
Display::return_icon('synthese_view.gif', get_lang('Overview')).'</a>'. |
|
|
|
|
'<a href="'.api_get_path(WEB_COURSE_PATH).$course_info['path'].'?id_session='.$id_session.'">'. |
|
|
|
|
Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>'; |
|
|
|
|
|
|
|
|
|
if ($my_course['status'] == STUDENT) { |
|
|
|
|
$tools .= '<a href="user_information.php?action=unsubscribe&course_code='.$course_info['code'].'&user_id='.$user['user_id'].'">'.Display::return_icon('delete.png', get_lang('Delete')).'</a>'; |
|
|
|
|
$tools .= '<a href="user_information.php?action=unsubscribe&course_code='.$course_info['code'].'&user_id='.$user['user_id'].'">'. |
|
|
|
|
Display::return_icon('delete.png', get_lang('Delete')).'</a>'; |
|
|
|
|
} |
|
|
|
|
$row[] = $tools; |
|
|
|
|
$data[] = $row; |
|
|
|
|
} |
|
|
|
|
if ($session_item['date_start'] == '0000-00-00') { |
|
|
|
|
$session_item['date_start'] = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($session_item['date_end'] == '0000-00-00') { |
|
|
|
|
$session_item['date_end'] = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$dates = array_filter(array($session_item['date_start'], $session_item['date_end'])); |
|
|
|
|
echo Display::page_subheader($session_item['session_name'], ' '.implode(' - ', $dates)); |
|
|
|
|
|
|
|
|
|
@ -162,8 +186,7 @@ if (Database::num_rows($res) > 0) { |
|
|
|
|
/** |
|
|
|
|
* Show the URL in which this user is subscribed |
|
|
|
|
*/ |
|
|
|
|
global $_configuration; |
|
|
|
|
if ($_configuration['multiple_access_urls']) { |
|
|
|
|
if (api_is_multiple_url_enabled()) { |
|
|
|
|
$url_list= UrlManager::get_access_url_from_user($user['user_id']); |
|
|
|
|
if (count($url_list) > 0) { |
|
|
|
|
$header = array(); |
|
|
|
|
|