|
|
|
@ -75,16 +75,16 @@ function save_item($lp_id, $user_id, $view_id, $item_id, $score = -1, $max = -1, |
|
|
|
|
require_once 'aiccItem.class.php'; |
|
|
|
|
$mylp = ''; |
|
|
|
|
if (isset($_SESSION['lpobject'])) { |
|
|
|
|
if ($debug > 1) { error_log('////$_SESSION[lpobject] is set', 0); } |
|
|
|
|
if ($debug > 1) { error_log('$_SESSION[lpobject] is set', 0); } |
|
|
|
|
$oLP = unserialize($_SESSION['lpobject']); |
|
|
|
|
if (!is_object($oLP)) { |
|
|
|
|
if ($debug > 2) { error_log(print_r($oLP, true), 0); } |
|
|
|
|
if ($debug > 2) { error_log('////Building new lp', 0); } |
|
|
|
|
if ($debug > 2) { error_log('Building new lp', 0); } |
|
|
|
|
unset($oLP); |
|
|
|
|
$code = api_get_course_id(); |
|
|
|
|
$mylp = new learnpath($code, $lp_id, $user_id); |
|
|
|
|
} else { |
|
|
|
|
if ($debug > 2) { error_log('////Reusing session lp', 0); } |
|
|
|
|
if ($debug > 2) { error_log('Reusing session lp', 0); } |
|
|
|
|
$mylp = & $oLP; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -207,16 +207,16 @@ function save_objectives($lp_id, $user_id, $view_id, $item_id, $objectives = arr |
|
|
|
|
require_once 'aiccItem.class.php'; |
|
|
|
|
$mylp = ''; |
|
|
|
|
if (isset($_SESSION['lpobject'])) { |
|
|
|
|
if ($debug > 1) { error_log('////$_SESSION[lpobject] is set', 0); } |
|
|
|
|
if ($debug > 1) { error_log('$_SESSION[lpobject] is set', 0); } |
|
|
|
|
$oLP = unserialize($_SESSION['lpobject']); |
|
|
|
|
if (!is_object($oLP)) { |
|
|
|
|
if ($debug > 2) { error_log(print_r($oLP, true), 0); } |
|
|
|
|
if ($debug > 2) { error_log('////Building new lp', 0); } |
|
|
|
|
if ($debug > 2) { error_log('Building new lp', 0); } |
|
|
|
|
unset($oLP); |
|
|
|
|
$code = api_get_course_id(); |
|
|
|
|
$mylp = new learnpath($code,$lp_id,$user_id); |
|
|
|
|
} else { |
|
|
|
|
if ($debug > 2) { error_log('////Reusing session lp', 0); } |
|
|
|
|
if ($debug > 2) { error_log('Reusing session lp', 0); } |
|
|
|
|
$mylp = & $oLP; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -261,16 +261,16 @@ function switch_item_details($lp_id, $user_id, $view_id, $current_item, $next_it |
|
|
|
|
require_once 'aiccItem.class.php'; |
|
|
|
|
$mylp = ''; |
|
|
|
|
if (isset($_SESSION['lpobject'])) { |
|
|
|
|
if ($debug > 1) { error_log('////$_SESSION[lpobject] is set', 0); } |
|
|
|
|
if ($debug > 1) { error_log('$_SESSION[lpobject] is set', 0); } |
|
|
|
|
$oLP = unserialize($_SESSION['lpobject']); |
|
|
|
|
if (!is_object($oLP)) { |
|
|
|
|
if ($debug > 1) { error_log(print_r($oLP, true), 0); } |
|
|
|
|
if ($debug > 2) { error_log('////Building new lp', 0); } |
|
|
|
|
if ($debug > 2) { error_log('Building new lp', 0); } |
|
|
|
|
unset($oLP); |
|
|
|
|
$code = api_get_course_id(); |
|
|
|
|
$mylp = new learnpath($code,$lp_id,$user_id); |
|
|
|
|
} else { |
|
|
|
|
if ($debug > 1) { error_log('////Reusing session lp', 0); } |
|
|
|
|
if ($debug > 1) { error_log('Reusing session lp', 0); } |
|
|
|
|
$mylp = & $oLP; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|