|
|
|
@ -107,6 +107,7 @@ $auto_launch = api_get_course_setting('enable_exercise_auto_launch'); |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($auto_launch)) { |
|
|
|
if (!empty($auto_launch)) { |
|
|
|
$session_id = api_get_session_id(); |
|
|
|
$session_id = api_get_session_id(); |
|
|
|
|
|
|
|
|
|
|
|
//Exercise list |
|
|
|
//Exercise list |
|
|
|
if ($auto_launch == 2) { |
|
|
|
if ($auto_launch == 2) { |
|
|
|
if (api_is_platform_admin() || api_is_allowed_to_edit()) { |
|
|
|
if (api_is_platform_admin() || api_is_allowed_to_edit()) { |
|
|
|
@ -116,7 +117,8 @@ if (!empty($auto_launch)) { |
|
|
|
if (!isset($_SESSION[$session_key])) { |
|
|
|
if (!isset($_SESSION[$session_key])) { |
|
|
|
//redirecting to the Exercise |
|
|
|
//redirecting to the Exercise |
|
|
|
$url = api_get_path(WEB_CODE_PATH).'exercice/exercice.php?'.api_get_cidreq().'&id_session='.$session_id; |
|
|
|
$url = api_get_path(WEB_CODE_PATH).'exercice/exercice.php?'.api_get_cidreq().'&id_session='.$session_id; |
|
|
|
$_SESSION[$session_key] = true; |
|
|
|
Session::write($session_key, true); |
|
|
|
|
|
|
|
//$_SESSION[$session_key] = true; |
|
|
|
header("Location: $url"); |
|
|
|
header("Location: $url"); |
|
|
|
exit; |
|
|
|
exit; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -150,7 +152,8 @@ if (!empty($auto_launch)) { |
|
|
|
//redirecting to the LP |
|
|
|
//redirecting to the LP |
|
|
|
$url = api_get_path(WEB_CODE_PATH).'exercice/overview.php?'.api_get_cidreq().'&exerciseId='.$data['iid']; |
|
|
|
$url = api_get_path(WEB_CODE_PATH).'exercice/overview.php?'.api_get_cidreq().'&exerciseId='.$data['iid']; |
|
|
|
|
|
|
|
|
|
|
|
$_SESSION[$session_key] = true; |
|
|
|
//$_SESSION[$session_key] = true; |
|
|
|
|
|
|
|
Session::write($session_key, true); |
|
|
|
header("Location: $url"); |
|
|
|
header("Location: $url"); |
|
|
|
exit; |
|
|
|
exit; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -174,7 +177,8 @@ if (!empty($auto_launch)) { |
|
|
|
if (!isset($_SESSION[$session_key])) { |
|
|
|
if (!isset($_SESSION[$session_key])) { |
|
|
|
//redirecting to the LP |
|
|
|
//redirecting to the LP |
|
|
|
$url = api_get_path(WEB_CODE_PATH).'newscorm/lp_controller.php?'.api_get_cidreq().'&id_session='.$session_id; |
|
|
|
$url = api_get_path(WEB_CODE_PATH).'newscorm/lp_controller.php?'.api_get_cidreq().'&id_session='.$session_id; |
|
|
|
$_SESSION[$session_key] = true; |
|
|
|
//$_SESSION[$session_key] = true; |
|
|
|
|
|
|
|
Session::write($session_key, true); |
|
|
|
header("Location: $url"); |
|
|
|
header("Location: $url"); |
|
|
|
exit; |
|
|
|
exit; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -208,7 +212,8 @@ if (!empty($auto_launch)) { |
|
|
|
//redirecting to the LP |
|
|
|
//redirecting to the LP |
|
|
|
$url = api_get_path(WEB_CODE_PATH).'newscorm/lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$lp_data['id']; |
|
|
|
$url = api_get_path(WEB_CODE_PATH).'newscorm/lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$lp_data['id']; |
|
|
|
|
|
|
|
|
|
|
|
$_SESSION[$session_key] = true; |
|
|
|
//$_SESSION[$session_key] = true; |
|
|
|
|
|
|
|
Session::write($session_key, true); |
|
|
|
header("Location: $url"); |
|
|
|
header("Location: $url"); |
|
|
|
exit; |
|
|
|
exit; |
|
|
|
} |
|
|
|
} |
|
|
|
|