MDL-30576, Fixing cmi.completion_threshold and default value of minProgressMeasure...
authorMayank Gupa <mayankgupta2005@gmail.com>
Sun, 4 Dec 2011 22:36:10 +0000 (04:06 +0530)
committerMayank Gupa <mayankgupta2005@gmail.com>
Sun, 4 Dec 2011 22:36:10 +0000 (04:06 +0530)
mod/scorm/datamodels/scormlib.php

index cc77fa7..d3a1ab9 100644 (file)
@@ -208,10 +208,10 @@ function scorm_get_manifest($blocks, $scoes) {
                 case 'ADLCP:COMPLETIONTHRESHOLD':
                     $parent = array_pop($parents);
                     array_push($parents, $parent);
                 case 'ADLCP:COMPLETIONTHRESHOLD':
                     $parent = array_pop($parents);
                     array_push($parents, $parent);
-                    if (!isset($block['tagData'])) {
-                        $block['tagData'] = '';
+                    if (!isset($block['attrs']['MINPROGRESSMEASURE'])) {
+                        $block['attrs']['MINPROGRESSMEASURE'] = '1.0';
                     }
                     }
-                    $scoes->elements[$manifest][$parent->organization][$parent->identifier]->threshold = $block['tagData'];
+                    $scoes->elements[$manifest][$parent->organization][$parent->identifier]->threshold = $block['attrs']['MINPROGRESSMEASURE'];
                 break;
                 case 'ADLNAV:PRESENTATION':
                     $parent = array_pop($parents);
                 break;
                 case 'ADLNAV:PRESENTATION':
                     $parent = array_pop($parents);