open($filename, ZipArchive::CREATE); if ($res === true) { foreach ($ids as $id) { $item = $TeKe->plugin->loadType("", $id); $itemXML = $item->getXML(); $zip->addFromString("{$id}.xml", $itemXML); } $manifest = $this->createManifestFile($ids); $zip->addFromString("imsmanifest.xml", $manifest); $zip->close(); } return $filename; } function createManifestFile($ids) { global $TeKe; $manifest = $this->manifest_beginning(); foreach ($ids as $id) { $item = $TeKe->plugin->loadType("", $id); $item_package = $item->getPackage(); $manifest .= $item_package; } $manifest .= $this->manifest_end(); return $manifest; } function manifest_beginning() { $pack = " IMS Content 1.1 Contentpackage with QTI v2.1 items en Contentpackage LOMv1.0 QTIv2.1 en (c) 2004, IMS Global Learning Consortium; individual questions may have own copyright statement. \n"; return $pack; } function manifest_end() { return "\t\n"; } } ?>