Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-33078 SCORM: rebuild toc when calling LMSCommit to improve pre-re…

…q handling
  • Loading branch information...
commit 76b177f6c3fe66870c2825bfdd2e47857d170542 1 parent a07fe91
Dan Marsden danmarsden authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 mod/scorm/datamodels/scorm_12.js.php
6 mod/scorm/datamodels/scorm_12.js.php
View
@@ -427,6 +427,12 @@ function LMSCommit (param) {
if (param == "") {
if (Initialized) {
result = StoreData(cmi,false);
+ // trigger TOC update
+ var sURL = "<?php echo $CFG->wwwroot; ?>" + "/mod/scorm/prereqs.php?a=<?php echo $scorm->id ?>&scoid=<?php echo $scoid ?>&attempt=<?php echo $attempt ?>&mode=<?php echo $mode ?>&currentorg=<?php echo $currentorg ?>&sesskey=<?php echo sesskey(); ?>";
+ var callback = M.mod_scorm.connectPrereqCallback;
+ YUI().use('yui2-connection', function(Y) {
+ Y.YUI2.util.Connect.asyncRequest('GET', sURL, callback, null);
+ });
<?php
if (scorm_debugging($scorm)) {
echo 'LogAPICall("Commit", param, "", 0);';
Please sign in to comment.
Something went wrong with that request. Please try again.