'session_list.php', 'name' => get_lang('Session list'), ]; // Setting the name of the tool $tool_name = get_lang('Subscribe students to session(s)'); $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 = []; $id = isset($_GET['id']) ? intval($_GET['id']) : 0; SessionManager::protectSession($id); $htmlResult = ''; 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([], ['name']); $sessionList = []; 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('Subscribe students to session(s)').''; ?>