'session_list.php', 'name' => get_lang('Session list'), ]; // Setting the name of the tool $tool_name = get_lang('Enroll trainers from existing sessions'); $form_sent = 0; $errorMsg = ''; $id = isset($_GET['id']) ? (int) $_GET['id'] : 0; SessionManager::protectSession($id); $htmlResult = ''; if (isset($_POST['form_sent']) && $_POST['form_sent']) { $form_sent = $_POST['form_sent']; if ($form_sent == 1 && isset($_POST['sessions']) && isset($_POST['courses']) ) { $sessions = $_POST['sessions']; $courses = $_POST['courses']; $htmlResult = SessionManager::copyCoachesFromSessionToCourse( $sessions, $courses ); } } $session_list = SessionManager::get_sessions_list([], ['name']); $sessionList = []; foreach ($session_list as $session) { $sessionList[$session['id']] = $session['name']; } $courseList = CourseManager::get_courses_list(0, 0, 'title'); $courseOptions = []; foreach ($courseList as $course) { $courseOptions[$course['id']] = $course['title']; } Display::display_header($tool_name); ?>
'.$tool_name.' '; echo $htmlResult; echo Display::input('hidden', 'form_sent', '1'); ?>
: :
'width:360px', 'multiple' => 'multiple', 'id' => 'sessions', 'size' => '15px'], false ); ?> 'width:360px', 'id' => 'courses', 'size' => '15px'], false ); ?>

'. get_lang('Subscribe teachers to session(s)').''; ?>