|
|
|
@ -321,7 +321,7 @@ function event_link($link_id) { |
|
|
|
|
* @author Julio Montoya Armas <gugli100@gmail.com> Reworked 2010 |
|
|
|
|
* @desc Record result of user when an exercice was done |
|
|
|
|
*/ |
|
|
|
|
function update_event_exercice($exeid, $exo_id, $score, $weighting,$session_id,$learnpath_id=0, $learnpath_item_id=0, $learnpath_item_view_id = 0, $duration, $question_list, $status = '', $remind_list = array()) { |
|
|
|
|
function update_event_exercice($exeid, $exo_id, $score, $weighting,$session_id,$learnpath_id=0, $learnpath_item_id=0, $learnpath_item_view_id = 0, $duration, $question_list, $status = '', $remind_list = array() , $end_date = null) { |
|
|
|
|
require_once api_get_path(SYS_CODE_PATH).'exercice/exercise.lib.php'; |
|
|
|
|
if ($exeid != '') { |
|
|
|
|
// Validation in case of fraud with actived control time |
|
|
|
@ -357,6 +357,10 @@ function update_event_exercice($exeid, $exo_id, $score, $weighting,$session_id,$ |
|
|
|
|
$remind_list = ''; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (empty($end_date)) { |
|
|
|
|
$end_date = api_get_utc_datetime(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$sql = "UPDATE $TABLETRACK_EXERCICES SET |
|
|
|
|
exe_exo_id = '".Database::escape_string($exo_id)."', |
|
|
|
|
exe_result = '".Database::escape_string($score)."', |
|
|
|
@ -366,7 +370,7 @@ function update_event_exercice($exeid, $exo_id, $score, $weighting,$session_id,$ |
|
|
|
|
orig_lp_item_id = '".Database::escape_string($learnpath_item_id)."', |
|
|
|
|
orig_lp_item_view_id = '".Database::escape_string($learnpath_item_view_id)."', |
|
|
|
|
exe_duration = '".Database::escape_string($duration)."', |
|
|
|
|
exe_date = '".api_get_utc_datetime()."', |
|
|
|
|
exe_date = '".$end_date."', |
|
|
|
|
status = '".$status."', |
|
|
|
|
questions_to_check = '".$remind_list."', |
|
|
|
|
data_tracking = '".implode(',', $question_list)."' |
|
|
|
|