'index.php','name' => get_lang('Sessions')); $interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); $session = api_get_session_info($id_session); $session_cat_info = SessionManager::get_session_category($session['session_category_id']); $session_category = null; if (!empty($session_cat_info)) { $session_category = $session_cat_info['name']; } $action = isset($_GET['action']) ? $_GET['action'] : null; $url_id = api_get_current_access_url_id(); switch ($action) { case 'add_user_to_url': $user_id = $_REQUEST['user_id']; $result = UrlManager::add_user_to_url($user_id, $url_id); $user_info = api_get_user_info($user_id); if ($result) { $message = Display::return_message(get_lang('UserAdded').' '.api_get_person_name($user_info['firstname'], $user_info['lastname']), 'confirm'); } break; case 'delete': if (isset($_GET['course_code_to_delete'])) { SessionManager::delete_course_in_session($id_session, $_GET['course_code_to_delete']); } if (!empty($_GET['user'])) { SessionManager::unsubscribe_user_from_session($id_session, $_GET['user']); } break; } Display::display_header($tool_name); if (!empty($_GET['warn'])) { Display::display_warning_message(urldecode($_GET['warn'])); } if (!empty($message)) { echo $message; } $dates = SessionManager::parse_session_dates($session); echo Display::page_header(Display::return_icon('session.png', get_lang('Session')).' '.$session['name']." $dates"); $url = Display::url(Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL), "session_add.php?page=resume_session.php&id=$id_session"); echo Display::page_subheader(get_lang('GeneralProperties').$url); $coach_info = api_get_user_info($session['id_coach']); ?> get_all(); foreach ($session_fields as $session_field) { if ($session_field['field_visible'] != '1') { continue; } $obj = new SessionFieldValue(); $result = $obj->get_values_by_handler_and_field_id($id_session, $session_field['id'], true); $session_value = null; if ($result) { $session_value = $result['field_value']; } echo ""; echo ""; echo ""; echo ""; } $multiple_url_is_on = api_is_multiple_url_enabled(); if ($multiple_url_is_on) { echo ''; echo ''; } ?>
:
:
:
:
:
:
:
:
{$session_field['field_display_text']} $session_value
'; echo 'URL'; echo ''; $url_list = UrlManager::get_access_url_from_session($id_session); foreach ($url_list as $url_data) { echo $url_data['url'].'
'; } echo '

'; } else { $courses = SessionManager::get_course_list_by_session_id($id_session); foreach ($courses as $course) { $count_users = SessionManager::get_count_users_in_course_session($course['id'], $id_session); $coaches = SessionManager::get_session_course_coaches_to_string($course['id'], $id_session); $orig_param = '&origin=resume_session'; //hide_course_breadcrumb the parameter has been added to hide the name of the course, that appeared in the default $interbreadcrumb echo ' '; } } ?>
'.get_lang('NoCoursesForThisSession').'
'.Display::url($course['title'].' ('.$course['visual_code'].')', api_get_path(WEB_COURSE_PATH).$course['code'].'/index.php?id_session='.$id_session),' '.$coaches.' '.$count_users.' '.Display::return_icon('course_home.gif', get_lang('Course')).' '.Display::return_icon('user.png', get_lang('Edit'), '', ICON_SIZE_SMALL).' '.Display::return_icon('import_csv.png', get_lang('ImportUsersToACourse'), null, ICON_SIZE_SMALL).' '.Display::return_icon('statistics.gif', get_lang('Tracking')).'  '.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).' '.Display::return_icon('delete.png', get_lang('Delete')).'

'.$user_info['complete_name_with_username'].''; } $origin = null; $destination = null; $row_style = null; $course_link = ''.Display::return_icon('course.gif', get_lang('BlockCoursesForThisUser')).' '; $moved_link = ''.Display::return_icon('move.png', get_lang('ChangeUserSession')).' '; //User in this session is subscribed but was moved to another session if (isset($user['moved_to']) && !empty($user['moved_to']) || $user['moved_status'] == SessionManager::SESSION_CHANGE_USER_REASON_ENROLLMENT_ANNULATION) { $variation = SessionManager::get_session_change_user_reasons_variations_by_id($user['moved_status'], 'to'); //$information = $reasons[$user['moved_status']].$variation; $information .= $variation; $moved_date = isset($user['moved_at']) && $user['moved_at'] != '0000-00-00 00:00:00' ? api_get_local_time($user['moved_at']) : '-'; $session_info = SessionManager::fetch($user['moved_to']); if ($user['moved_status'] != SessionManager::SESSION_CHANGE_USER_REASON_ENROLLMENT_ANNULATION) { $url = api_get_path(WEB_CODE_PATH).'admin/resume_session.php?id_session='.$id_session; //$origin = Display::url($session['name'], $url); if ($session_info) { $url = api_get_path(WEB_CODE_PATH).'admin/resume_session.php?id_session='.$session_info['id']; $destination = Display::url($session_info['name'], $url); //$destination = $destination; } } $row_style = 'style = " background-color: #ddd;"'; $course_link= Display::return_icon('course_na.gif', get_lang('BlockCoursesForThisUser')).' '; $moved_link = Display::return_icon('move_na.png', get_lang('ChangeUserSession')).' '; $delete_link = Display::return_icon('delete_na.png', get_lang('Delete')).' '; } else { $session_origin_info = SessionManager::get_session_rel_user_by_moved_to($id_session, $user['user_id']); if (!empty($session_origin_info)) { $moved_date = api_get_local_time($session_origin_info['moved_at']); } $session_info = SessionManager::fetch($session_origin_info['id_session']); $variation = SessionManager::get_session_change_user_reasons_variations_by_id($session_origin_info['moved_status'], 'from'); //$information = $reasons[$session_origin_info['moved_status']].$variation; $information .= $variation; if ($session_info) { $url = api_get_path(WEB_CODE_PATH).'admin/resume_session.php?id_session='.$session_info['id']; $origin = Display::url($session_info['name'], $url); $url = api_get_path(WEB_CODE_PATH).'admin/resume_session.php?id_session='.$id_session; //$destination = Display::url($session['name'], $url); //$destination = ' / '.$destination; } $delete_link = ''.Display::return_icon('delete.png', get_lang('Delete')).''; } $link_to_add_user_in_url = ''; if ($multiple_url_is_on) { if (isset($user['access_url_id']) && $user['access_url_id'] != $url_id) { $user_link .= ' '.Display::return_icon('warning.png', get_lang('UserNotAddedInURL'), array(), ICON_SIZE_SMALL); $add = Display::return_icon('add.png', get_lang('AddUsersToURL'), array(), ICON_SIZE_SMALL); $link_to_add_user_in_url = ''.$add.''; } } echo ''; } } else { echo ''; } ?>
'.$user_link.' '.$user_status_in_platform.' '.$information.' '.$origin.' '.$destination.' '.$moved_date.' '.Display::return_icon('statistics.gif', get_lang('Reporting')).'  '.$course_link.' '.$moved_link.' '.$delete_link.' '.$link_to_add_user_in_url.'
'.get_lang('NoUsersForThisSession').'