Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. +6 0 mod/scorm/datamodels/scorm_12.js.php
6 mod/scorm/datamodels/scorm_12.js.php
@@ -427,6 +427,12 @@ function LMSCommit (param) {
427 427 if (param == "") {
428 428 if (Initialized) {
429 429 result = StoreData(cmi,false);
  430 + // trigger TOC update
  431 + 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(); ?>";
  432 + var callback = M.mod_scorm.connectPrereqCallback;
  433 + YUI().use('yui2-connection', function(Y) {
  434 + Y.YUI2.util.Connect.asyncRequest('GET', sURL, callback, null);
  435 + });
430 436 <?php
431 437 if (scorm_debugging($scorm)) {
432 438 echo 'LogAPICall("Commit", param, "", 0);';

0 comments on commit 76b177f

Please sign in to comment.
Something went wrong with that request. Please try again.