]> _ Git - cubeextranet.git/commitdiff
#2048
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 25 May 2018 15:27:48 +0000 (15:27 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 25 May 2018 15:27:48 +0000 (15:27 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/scorm2004/class.ws.html5.compiler.php

index ec8cb08c51545e3428455284fc83f1d3a8063753..aa4a89825ec03636d759806cfe5411c3be03b859 100644 (file)
@@ -714,7 +714,13 @@ class wsHTML5Compiler
 
        protected function writeScorm()
        {
-               $manifest = file_get_contents($this->assets . '/_imsmanifest.xml');
+               if ($this->book->parametres->scorm_version == '1.2') {
+                       $manifestfile = '_imsmanifest.12.xml';
+               } elseif ($this->book->parametres->scorm_version = '2004') {
+                       $manifestfile = '_imsmanifest.2004.xml';
+               }
+
+               $manifest = file_get_contents($this->assets . '/' . $manifestfile);
                if (!$this->book->parametres->scorm_title) {
                        $this->book->parametres->scorm_title = $this->book->parametres->title;
                }
@@ -741,6 +747,9 @@ class wsHTML5Compiler
                        $variables[$f[0]] = $f[1];
                }
                $this->config->scorm_variables = $this->book->parametres->scorm_variables = $variables;
+               if ($this->book->parametres->scorm_quizdata) {
+                       $this->config->scorm_quizdata = wsUtil::excelToArray($this->wdir . '/' . $this->book->parametres->scorm_quizdata);
+               }
        }
 
        protected function writePrint()
@@ -1844,6 +1853,16 @@ class wsHTML5Compiler
                                $res['height'] = intval((string)$canvas->getAttribute('height'));
                        }
 
+                       $m = $xpath->query('//meta[@name="width"]');
+                       foreach ($m as $meta) {
+                               $res['width'] = intval((string)$meta->getAttribute('content'));
+                       }
+
+                       $m = $xpath->query('//meta[@name="height"]');
+                       foreach ($m as $meta) {
+                               $res['height'] = intval((string)$meta->getAttribute('content'));
+                       }
+
                        $r = array('html' => 'index.html', 'inject' => array(), 'injectcss' => array(), 'injectjs' => array());
                } else {
                        $r = array('html' => false, 'inject' => array(file_get_contents($d . '/init.js')), 'injectcss' => array('multimedia.css'), 'injectjs' => array('multimedia.js'));
index b04ea9dd23f6234a7df2f204ddc13901f05ca81e..2a809f031be4a64be88eb9c411af59276f6d0eeb 100644 (file)
@@ -724,7 +724,7 @@ class wsHTML5Compiler
                if (!$this->book->parametres->scorm_title) {
                        $this->book->parametres->scorm_title = $this->book->parametres->title;
                }
-               if (!$this->book->parametres->scorm_id) {
+               if (!$this->book->parametres->scorm_id || ($this->book->parametres->id > 16614 && $this->book->parametres->scorm_id == 'MFMCTE091mobile')) {
                        $this->book->parametres->scorm_id = 'fb_' . $this->book->parametres->id;
                }
                if (!$this->book->parametres->scorm_org) {