|
|
@ -1010,7 +1010,6 @@ class ImportCsv |
|
|
|
// 2014-06-30 |
|
|
|
// 2014-06-30 |
|
|
|
$dateStart = explode('/', $session['DateStart']); |
|
|
|
$dateStart = explode('/', $session['DateStart']); |
|
|
|
$dateEnd = explode('/', $session['DateEnd']); |
|
|
|
$dateEnd = explode('/', $session['DateEnd']); |
|
|
|
//$visibility = $session['visibility']; |
|
|
|
|
|
|
|
$visibility = $this->defaultSessionVisibility; |
|
|
|
$visibility = $this->defaultSessionVisibility; |
|
|
|
|
|
|
|
|
|
|
|
$coachId = null; |
|
|
|
$coachId = null; |
|
|
@ -1028,8 +1027,8 @@ class ImportCsv |
|
|
|
$dateEnd[0], |
|
|
|
$dateEnd[0], |
|
|
|
$dateEnd[1], |
|
|
|
$dateEnd[1], |
|
|
|
$dateEnd[2], |
|
|
|
$dateEnd[2], |
|
|
|
null, //$session['nb_days_access_before_beginning'], |
|
|
|
$this->daysCoachAccessBeforeBeginning, |
|
|
|
null, //$session['nb_days_access_after_end'], |
|
|
|
$this->daysCoachAccessAfterBeginning, |
|
|
|
null, |
|
|
|
null, |
|
|
|
$coachUserName, |
|
|
|
$coachUserName, |
|
|
|
$categoryId, |
|
|
|
$categoryId, |
|
|
@ -1045,6 +1044,26 @@ class ImportCsv |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$sessionInfo = api_get_session_info($sessionId); |
|
|
|
|
|
|
|
$accessBefore = null; |
|
|
|
|
|
|
|
$accessAfter = null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($sessionInfo['nb_days_access_before_beginning']) || |
|
|
|
|
|
|
|
(!empty($sessionInfo['nb_days_access_before_beginning']) && |
|
|
|
|
|
|
|
$sessionInfo['nb_days_access_before_beginning'] < $this->daysCoachAccessBeforeBeginning) |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
$accessBefore = intval($this->daysCoachAccessBeforeBeginning); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$accessAfter = null; |
|
|
|
|
|
|
|
if (empty($sessionInfo['nb_days_access_after_end']) || |
|
|
|
|
|
|
|
(!empty($sessionInfo['nb_days_access_after_end']) && |
|
|
|
|
|
|
|
$sessionInfo['nb_days_access_after_end'] < $this->daysCoachAccessAfterBeginning) |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
$accessAfter = intval($this->daysCoachAccessAfterBeginning); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$result = SessionManager::edit_session( |
|
|
|
$result = SessionManager::edit_session( |
|
|
|
$sessionId, |
|
|
|
$sessionId, |
|
|
|
$session['SessionName'], |
|
|
|
$session['SessionName'], |
|
|
@ -1054,8 +1073,8 @@ class ImportCsv |
|
|
|
$dateEnd[0], |
|
|
|
$dateEnd[0], |
|
|
|
$dateEnd[1], |
|
|
|
$dateEnd[1], |
|
|
|
$dateEnd[2], |
|
|
|
$dateEnd[2], |
|
|
|
null,//$session['nb_days_access_before_beginning'], |
|
|
|
$accessBefore, |
|
|
|
null,//$session['nb_days_access_after_end'], |
|
|
|
$accessAfter, |
|
|
|
null, |
|
|
|
null, |
|
|
|
$coachId, |
|
|
|
$coachId, |
|
|
|
$categoryId, |
|
|
|
$categoryId, |
|
|
|