From: vincent@cubedesigners.com Date: Fri, 11 Mar 2022 10:41:00 +0000 (+0000) Subject: wip #5156 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e6937367df3d522eb0d9a2555d203799a9b34cdf;p=cubeextranet.git wip #5156 @0.5 --- diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index bc93aa31e..26353077a 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -832,8 +832,11 @@ class wsBookParametres extends wsParametres $this->fields['scorm_enable'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Activer SCORM'), 'grade' => 5); $this->fields['scorm_version'] = array('type' => 'combo', 'default' => '1.2', 'editable' => true, 'label' => __('Version du standard SCORM'), 'grade' => 5, - 'datas' => array(__('SCORM 1.2') => '1.2', - __('SCORM 2004 4th edition') => '2004') + 'datas' => array( + __('SCORM 1.2') => '1.2', + __('SCORM 2004 3rd edition') => '2004.3', + __('SCORM 2004 4th edition') => '2004', + ) ); $this->fields['scorm_id'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Identifiant SCORM'), 'grade' => 5); $this->fields['scorm_org'] = array('type' => 'text', 'default' => 'ACME-ORG-1350650111249', 'editable' => true, 'label' => __('Organisation SCORM'), 'grade' => 5); diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 0908a8a9d..3d8ba64ca 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1719,11 +1719,8 @@ height="0" width="0" style="display:none;visibility:hidden"> protected function writeScorm() { - if ($this->book->parametres->scorm_version == '1.2') { - $manifestfile = '_imsmanifest.12.xml'; - } elseif ($this->book->parametres->scorm_version == '2004') { - $manifestfile = '_imsmanifest.2004.xml'; - } + $manifestfiles=['1.2'=>'_imsmanifest.12.xml','2004'=>'_imsmanifest.2004.xml','2004.3'=>'_imsmanifest.2004-3.xml']; + $manifestfile=$manifestfiles[$this->book->parametres->scorm_version]; $manifest = file_get_contents($this->assets . '/' . $manifestfile); if (!$this->book->parametres->scorm_title) {