|
|
|
@ -1,5 +1,6 @@ |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @package chamilo.admin |
|
|
|
* @package chamilo.admin |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -9,32 +10,37 @@ $cidReset = true; |
|
|
|
// including some necessary files |
|
|
|
// including some necessary files |
|
|
|
require_once __DIR__.'/../inc/global.inc.php'; |
|
|
|
require_once __DIR__.'/../inc/global.inc.php'; |
|
|
|
|
|
|
|
|
|
|
|
// setting the section (for the tabs) |
|
|
|
// Setting the section (for the tabs) |
|
|
|
$this_section = SECTION_PLATFORM_ADMIN; |
|
|
|
$this_section = SECTION_PLATFORM_ADMIN; |
|
|
|
|
|
|
|
|
|
|
|
// setting breadcrumbs |
|
|
|
// Setting breadcrumbs |
|
|
|
//$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
|
|
$interbreadcrumb[] = array( |
|
|
|
$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
|
|
'url' => 'session_list.php', |
|
|
|
|
|
|
|
'name' => get_lang('SessionList') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Setting the name of the tool |
|
|
|
// Setting the name of the tool |
|
|
|
$tool_name = get_lang('EnrollTrainersFromExistingSessions'); |
|
|
|
$tool_name = get_lang('EnrollTrainersFromExistingSessions'); |
|
|
|
|
|
|
|
|
|
|
|
$form_sent = 0; |
|
|
|
$form_sent = 0; |
|
|
|
$errorMsg = ''; |
|
|
|
$errorMsg = ''; |
|
|
|
$id = intval($_GET['id']); |
|
|
|
$id = intval($_GET['id']); |
|
|
|
|
|
|
|
|
|
|
|
SessionManager::protectSession($id); |
|
|
|
SessionManager::protectSession($id); |
|
|
|
|
|
|
|
|
|
|
|
$htmlResult = null; |
|
|
|
$htmlResult = ''; |
|
|
|
|
|
|
|
|
|
|
|
if (isset($_POST['form_sent']) && $_POST['form_sent']) { |
|
|
|
if (isset($_POST['form_sent']) && $_POST['form_sent']) { |
|
|
|
$form_sent = $_POST['form_sent']; |
|
|
|
$form_sent = $_POST['form_sent']; |
|
|
|
|
|
|
|
|
|
|
|
if ($form_sent == 1 && isset($_POST['sessions']) && isset($_POST['courses'])) { |
|
|
|
if ($form_sent == 1 && |
|
|
|
|
|
|
|
isset($_POST['sessions']) && isset($_POST['courses']) |
|
|
|
|
|
|
|
) { |
|
|
|
$sessions = $_POST['sessions']; |
|
|
|
$sessions = $_POST['sessions']; |
|
|
|
$courses = $_POST['courses']; |
|
|
|
$courses = $_POST['courses']; |
|
|
|
|
|
|
|
$htmlResult = SessionManager::copyCoachesFromSessionToCourse( |
|
|
|
$htmlResult = SessionManager::copyCoachesFromSessionToCourse($sessions, $courses); |
|
|
|
$sessions, |
|
|
|
|
|
|
|
$courses |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|