$(document).ready(function() { //API_obj = window.frames.window.content.API; //API_obj = $('content_id').context.defaultView.content.API; //works only in FF //API_obj = window.parent.frames.window.top.API; API_obj = window.top.API; API_obj.void_save_asset('$score', '$weighting', 0, 'completed'); }); "; } } // Save the Scores save_scores($test, $score); // Back if ($origin != 'learnpath') { $url = "exercice.php"; // back to exercices $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(); }