$this->setOrganization($this->getOrganization() . '_ORG');
}
+ $org = $this->_escapeIdentifier($this->getOrganization());
+ $ref = $this->_escapeIdentifier($this->getReference());
+
return '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<manifest identifier="' . $this->_escape($this->getManifestID()) . '" version="1.3"
xmlns="http://www.imsglobal.org/xsd/imscp_v1p1"
<schema>ADL SCORM</schema>
<schemaversion>2004 ' . $v . ' Edition</schemaversion>
</metadata>
- <organizations default="' . $this->_escapeAttr($this->_escapeOrganization($this->getOrganization())) . '">
- <organization identifier="' . $this->_escapeAttr($this->_escapeOrganization($this->getOrganization())) . '" adlseq:objectivesGlobalToSystem="false">
+ <organizations default="' . $this->_escapeAttr($org) . '">
+ <organization identifier="' . $this->_escapeAttr($org) . '" adlseq:objectivesGlobalToSystem="false">
<title>' . $this->_escape($this->getTitle()) . '</title>
- <item identifier="' . $this->_escapeAttr($this->getReference()) . '" identifierref="' . $this->_escapeAttr($this->getReference()) . '_RES" isvisible="true">
+ <item identifier="' . $this->_escapeAttr($ref) . '" identifierref="' . $this->_escapeAttr($ref) . '_RES" isvisible="true">
<title>' . $this->_escape($this->getTitle()) . '</title>
<adlnav:presentation>
<adlnav:navigationInterface>
</organization>
</organizations>
<resources>
- <resource identifier="' . $this->_escapeAttr($this->getReference()) . '_RES" type="webcontent" adlcp:scormType="sco" href="' . $this->getStart() . '">
+ <resource identifier="' . $this->_escapeAttr($ref) . '_RES" type="webcontent" adlcp:scormType="sco" href="' . $this->getStart() . '">
<file href="' . $this->getStart() . '"/>
</resource>
</resources>
$this->setOrganization($this->getOrganization() . '_ORG');
}
+ $org = $this->_escapeIdentifier($this->getOrganization());
+ $ref = $this->_escapeIdentifier($this->getReference());
+
$res = '<?xml version="1.0" encoding="UTF-8"?>
<manifest
xmlns="http://www.imsproject.org/xsd/imscp_rootv1p1p2"
<schema>ADL SCORM</schema>
<schemaversion>1.2</schemaversion>
</metadata>
- <organizations default="' . $this->_escapeAttr($this->_escapeOrganization($this->getOrganization())) . '">
- <organization identifier="' . $this->_escapeAttr($this->_escapeOrganization($this->getOrganization())) . '" structure="hierarchical">
+ <organizations default="' . $this->_escapeAttr($org) . '">
+ <organization identifier="' . $this->_escapeAttr($org) . '" structure="hierarchical">
<title>' . $this->_escape($this->getTitle()) . '</title>
- <item identifier="' . $this->_escapeAttr($this->getReference()) . '" identifierref="' . $this->_escapeAttr($this->getReference()) . '_RES" isvisible="true">
+ <item identifier="' . $this->_escapeAttr($ref) . '" identifierref="' . $this->_escapeAttr($ref) . '_RES" isvisible="true">
<title>' . $this->_escape($this->getTitle()) . '</title>
</item>
</organization>
</organizations>
<resources>
- <resource type="webcontent" adlcp:scormtype="sco" identifier="' . $this->_escapeAttr($this->getReference()) . '_RES" href="' . $this->getStart() . '">
+ <resource type="webcontent" adlcp:scormtype="sco" identifier="' . $this->_escapeAttr($ref) . '_RES" href="' . $this->getStart() . '">
<file href="' . $this->getStart() . '"/>
</resource>
</resources>
return $res;
}
- protected function _escapeOrganization($org)
+ protected function _escapeIdentifier($org)
{
return preg_replace('/[^a-z0-9_]/i', '', $org);
}