$file,
'exe_user_id' => $user_id,
'exe_date' => $date,
'c_id' => $c_id,
'exe_result' => $score,
'exe_weighting' => $weighting,
];
Database::insert($TABLETRACK_HOTPOTATOES, $params);
if ($origin == 'learnpath') {
//if we are in a learning path, save the score in the corresponding
//table to get tracking in there as well
global $jscript2run;
//record the results in the learning path, using the SCORM interface (API)
$jscript2run .= "";
}
}
// Save the Scores
save_scores($test, $score);
// Back
if ($origin != 'learnpath') {
$url = "exercise.php"; // back to exercises
$jscript2run .= '';
echo $jscript2run;
} else {
$htmlHeadXtra[] = $jscript2run;
Display::display_reduced_header();
if (!empty($course_id) && !empty($learnpath_item_id) && !empty($lpViewId)) {
$sql = "UPDATE $TABLE_LP_ITEM_VIEW SET
status = 'completed'
WHERE
c_id = $course_id AND
lp_item_id= $learnpath_item_id AND
lp_view_id = $lpViewId
";
Database::query($sql);
Display::display_confirmation_message(get_lang('HotPotatoesFinished'));
} else {
Display::display_error_message(get_lang('Error'));
}
Display::display_footer();
}