|
|
|
@ -82,7 +82,7 @@ function save_item($lp_id, $user_id, $view_id, $item_id, $score = -1, $max = -1, |
|
|
|
|
if ($debug > 2) { error_log('////Building new lp', 0); } |
|
|
|
|
unset($oLP); |
|
|
|
|
$code = api_get_course_id(); |
|
|
|
|
$mylp = & new learnpath($code, $lp_id, $user_id); |
|
|
|
|
$mylp = new learnpath($code, $lp_id, $user_id); |
|
|
|
|
} else { |
|
|
|
|
if ($debug > 2) { error_log('////Reusing session lp', 0); } |
|
|
|
|
$mylp = & $oLP; |
|
|
|
@ -214,7 +214,7 @@ function save_objectives($lp_id, $user_id, $view_id, $item_id, $objectives = arr |
|
|
|
|
if ($debug > 2) { error_log('////Building new lp', 0); } |
|
|
|
|
unset($oLP); |
|
|
|
|
$code = api_get_course_id(); |
|
|
|
|
$mylp = & new learnpath($code,$lp_id,$user_id); |
|
|
|
|
$mylp = new learnpath($code,$lp_id,$user_id); |
|
|
|
|
} else { |
|
|
|
|
if ($debug > 2) { error_log('////Reusing session lp', 0); } |
|
|
|
|
$mylp = & $oLP; |
|
|
|
@ -268,7 +268,7 @@ function switch_item_details($lp_id, $user_id, $view_id, $current_item, $next_it |
|
|
|
|
if ($debug > 2) { error_log('////Building new lp', 0); } |
|
|
|
|
unset($oLP); |
|
|
|
|
$code = api_get_course_id(); |
|
|
|
|
$mylp = & new learnpath($code,$lp_id,$user_id); |
|
|
|
|
$mylp = new learnpath($code,$lp_id,$user_id); |
|
|
|
|
} else { |
|
|
|
|
if ($debug > 1) { error_log('////Reusing session lp', 0); } |
|
|
|
|
$mylp = & $oLP; |
|
|
|
@ -316,7 +316,7 @@ function switch_item_details($lp_id, $user_id, $view_id, $current_item, $next_it |
|
|
|
|
$mylpi = & $mylp->items[$new_item_id]; |
|
|
|
|
} else { |
|
|
|
|
if ($debug > 1) { error_log('In switch_item_details - generating new item object', 0); } |
|
|
|
|
$mylpi =& new learnpathItem($new_item_id, $user_id); |
|
|
|
|
$mylpi = new learnpathItem($new_item_id, $user_id); |
|
|
|
|
$mylpi->set_lp_view($view_id); |
|
|
|
|
} |
|
|
|
|
/* |
|
|
|
|