class Manifest
{
- const SCORM_1_2 = "1.2";
- const SCORM_2004 = "2004";
-
- protected $version = self::SCORM_2004;
+ protected $version = Version::SCORM_2004;
/**
* @var string
*/
protected $start = 'index.html';
- public function __construct($title, $version = self::SCORM_2004, $organization = null, $reference = null, $start = 'index.html')
+ public function __construct($title, $version = Version::SCORM_2004, $organization = null, $reference = null, $start = 'index.html')
{
$this->setVersion($version);
$this->setTitle($title);
public function __toString()
{
- if ($this->getVersion() === self::SCORM_1_2) {
+ if ($this->getVersion() === Version::SCORM_1_2) {
return $this->_render12();
} else {
return $this->_render2004();
protected function _render2004()
{
+ if ($this->version === Version::SCORM_2004) {
+ $v = '4th';
+ } else if ($this->version === Version::SCORM_2004_3) {
+ $v = '3rd';
+ }
+
return '<?xml version="1.0" standalone="no" ?>
<manifest identifier="' . $this->_escape($this->getManifestID()) . '" version="1.3"
xmlns="http://www.imsglobal.org/xsd/imscp_v1p1"
http://www.imsglobal.org/xsd/imsss imsss_v1p0.xsd">
<metadata>
<schema>ADL SCORM</schema>
- <schemaversion>2004 4th Edition</schemaversion>
+ <schemaversion>2004 ' . $v . ' Edition</schemaversion>
</metadata>
<organizations default="' . $this->_escapeAttr($this->getOrganization()) . '">
<organization identifier="' . $this->_escapeAttr($this->getOrganization()) . '" adlseq:objectivesGlobalToSystem="false">