'index.php', 'name' => get_lang('PlatformAdmin')); $interbreadcrumb[] = array('url' => "session_list.php","name" => get_lang('SessionList')); $interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$session_id,"name" => get_lang('SessionOverview')); set_time_limit(0); if (isset($_POST['formSent']) && $_POST['formSent']) { if (isset($_FILES['import_file']['tmp_name']) && !empty($_FILES['import_file']['tmp_name'])) { $form_sent = $_POST['formSent']; $send_mail = $_POST['sendMail'] ? 1 : 0; // CSV $users = Import::csv_to_array($_FILES['import_file']['tmp_name']); $user_list = array(); foreach ($users as $user_data) { $username = $user_data['username']; $user_id = UserManager::get_user_id_from_username($username); if ($user_id) { $user_list[] = $user_id; } } if (!empty($user_list)) { SessionManager::suscribe_users_to_session($session_id, $user_list, null, false, $send_mail); foreach ($user_list as & $user_id) { $user_info = api_get_user_info($user_id); $user_id = $user_info['complete_name']; } $error_message = get_lang('UsersAdded').' : '.implode(', ', $user_list); } } else { $error_message = get_lang('NoInputFile'); } } // Display the header. Display::display_header($tool_name); if (count($inserted_in_course) > 1) { $msg = get_lang('SeveralCoursesSubscribedToSessionBecauseOfSameVisualCode').': '; foreach ($inserted_in_course as $code => $title) { $msg .= ' '.$title.' ('.$title.'),'; } $msg = substr($msg, 0, -1); Display::display_warning_message($msg); } echo '
:
username; admin; teacher; jmontoya;