Skip to content
Permalink
Browse files

Bug fix MDL-8725

  • Loading branch information...
bobopinna
bobopinna committed Mar 15, 2007
1 parent 4ecb6a9 commit b0758a402dfa3e9b7fa4d4882268b27d2e351da6
Showing with 6 additions and 5 deletions.
  1. +5 −4 mod/scorm/datamodel.php
  2. +1 −1 mod/scorm/version.php
@@ -42,20 +42,21 @@
foreach ($_POST as $element => $value) {
$element = str_replace('__','.',$element);
if (substr($element,0,3) == 'cmi') {
$element = preg_replace('/N(\d+)/',".\$1",$element);
$result = scorm_insert_track($USER->id, $scorm->id, $scoid, $attempt, $element, $value) && $result;
$netelement = preg_replace('/\.N(\d+)\./',"\.\$1\.",$element);
$result = scorm_insert_track($USER->id, $scorm->id, $scoid, $attempt, $netelement, $value) && $result;
}
if (substr($element,0,15) == 'adl.nav.request') {
// SCORM 2004 Sequencing Request
require_once('datamodels/scorm_13lib.php');
require_once('datamodels/sequencinglib.php');
$search = array('@continue@', '@previous@', '@\{target=(\S+)\}choice@', '@exit@', '@exitAll@', '@abandon@', '@abandonAll@');
$replace = array('continue_', 'previous_', '\1', 'exit_', 'exitall_', 'abandon_', 'abandonall');
$action = preg_replace($search, $replace, $value);
if ($action != $value) {
// Evaluating navigation request
$valid = scorm_sequencing_overall ($scoid,$USER->id,$action);
//$valid = scorm_sequencing_overall ($scoid,$USER->id,$action);
$valid = 'true';
// Set valid request
$search = array('@continue@', '@previous@', '@\{target=(\S+)\}choice@');
@@ -10,7 +10,7 @@
// catch up now, so until 27th October please only increment in very tiny steps
// in HEAD, until we get past that date..
$module->version = 2007020200; // The (date) version of this module
$module->version = 2007031300; // The (date) version of this module
$module->requires = 2007020200; // The version of Moodle that is required
$module->cron = 300; // How often should cron check this module (seconds)?

0 comments on commit b0758a4

Please sign in to comment.
You can’t perform that action at this time.