'session_list.php', 'name' => get_lang('SessionList')); // Setting the name of the tool $tool_name = get_lang('SubscribeStudentsToSession'); $add_type = 'multiple'; if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') { $add_type = Security::remove_XSS($_REQUEST['add_type']); } $form_sent = 0; $errorMsg = ''; $users = $sessions = array(); $id = isset($_GET['id']) ? intval($_GET['id']) : null; SessionManager::protectSession($id); $htmlResult = null; if (isset($_POST['form_sent']) && $_POST['form_sent']) { $form_sent = $_POST['form_sent']; if ($form_sent == 1) { $sessionSourceList = $_POST['sessions']; $sessionDestinationList = $_POST['sessions_destination']; $result = SessionManager::copyStudentsFromSession($sessionSourceList, $sessionDestinationList); foreach ($result as $message) { $htmlResult .= $message; } } } $session_list = SessionManager::get_sessions_list(array(), array('name')); $sessionList = array(); foreach ($session_list as $session) { $sessionList[$session['id']] = $session['name']; } Display::display_header($tool_name); ?>
'.$tool_name.' '; echo $htmlResult; echo Display::input('hidden', 'form_sent', '1'); ?>
: :
'width:100%', 'multiple'=>'multiple', 'id'=>'sessions', 'size'=>'15px'), false ); ?> 'width:100%', 'id'=>'courses', 'size'=>'15px'), false ); ?>

'. get_lang('SubscribeStudentsToSession').''; ?>