|
@@ -7,7 +7,6 @@
|
|
|
|
|
|
$cidReset = true;
|
|
|
|
|
|
-// including the global Chamilo file
|
|
|
require_once '../inc/global.inc.php';
|
|
|
|
|
|
$xajax = new xajax();
|
|
@@ -23,10 +22,6 @@ api_protect_limit_for_session_admin();
|
|
|
$formSent=0;
|
|
|
$errorMsg='';
|
|
|
|
|
|
-/*$interbreadcrumb[] = array(
|
|
|
- 'url' => 'index.php',
|
|
|
- 'name' => get_lang('PlatformAdmin'),
|
|
|
-);*/
|
|
|
$interbreadcrumb[] = array(
|
|
|
'url' => 'session_list.php',
|
|
|
'name' => get_lang('SessionList'),
|
|
@@ -159,13 +154,15 @@ $form->setDefaults($formDefaults);
|
|
|
|
|
|
if ($form->validate()) {
|
|
|
$params = $form->getSubmitValues();
|
|
|
-
|
|
|
$name = $params['name'];
|
|
|
$startDate = $params['access_start_date'];
|
|
|
$endDate = $params['access_end_date'];
|
|
|
$displayStartDate = $params['display_start_date'];
|
|
|
- $displayendDate = $params['display_end_date'];
|
|
|
+ $displayEndDate = $params['display_end_date'];
|
|
|
$coachStartDate = $params['coach_access_start_date'];
|
|
|
+ if (empty($coachStartDate)) {
|
|
|
+ $coachStartDate = $displayStartDate;
|
|
|
+ }
|
|
|
$coachEndDate = $params['coach_access_end_date'];
|
|
|
$coach_username = intval($params['coach_username']);
|
|
|
$id_session_category = $params['session_category'];
|
|
@@ -173,7 +170,7 @@ if ($form->validate()) {
|
|
|
$duration = isset($params['duration']) ? $params['duration'] : null;
|
|
|
$description = $params['description'];
|
|
|
$showDescription = isset($params['show_description']) ? 1: 0;
|
|
|
- $sendSubscritionNotification = isset($params['send_subscription_notification']);
|
|
|
+ $sendSubscriptionNotification = isset($params['send_subscription_notification']);
|
|
|
|
|
|
$extraFields = array();
|
|
|
foreach ($params as $key => $value) {
|
|
@@ -187,7 +184,7 @@ if ($form->validate()) {
|
|
|
$startDate,
|
|
|
$endDate,
|
|
|
$displayStartDate,
|
|
|
- $displayendDate,
|
|
|
+ $displayEndDate,
|
|
|
$coachStartDate,
|
|
|
$coachEndDate,
|
|
|
$coach_username,
|
|
@@ -199,7 +196,7 @@ if ($form->validate()) {
|
|
|
$showDescription,
|
|
|
$extraFields,
|
|
|
null,
|
|
|
- $sendSubscritionNotification
|
|
|
+ $sendSubscriptionNotification
|
|
|
);
|
|
|
|
|
|
if ($return == strval(intval($return))) {
|
|
@@ -212,7 +209,7 @@ if ($form->validate()) {
|
|
|
Display::display_header($tool_name);
|
|
|
|
|
|
if (!empty($return)) {
|
|
|
- Display::display_error_message($return,false);
|
|
|
+ Display::display_error_message($return, false);
|
|
|
}
|
|
|
|
|
|
echo '<div class="actions">';
|