Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 require_once("content/classes/SCORM/class.ilSCORMObject.php");
00025
00035 class ilSCORMManifest extends ilSCORMObject
00036 {
00037 var $import_id;
00038 var $version;
00039 var $xml_base;
00040
00041
00048 function ilSCORMManifest($a_id = 0)
00049 {
00050 parent::ilSCORMObject($a_id);
00051 $this->setType("sma");
00052 }
00053
00054 function getImportId()
00055 {
00056 return $this->import_id;
00057 }
00058
00059 function setImportId($a_import_id)
00060 {
00061 $this->import_id = $a_import_id;
00062 $this->setTitle($a_import_id);
00063 }
00064
00065 function getVersion()
00066 {
00067 return $this->version;
00068 }
00069
00070 function setVersion($a_version)
00071 {
00072 $this->version = $a_version;
00073 }
00074
00075 function getXmlBase()
00076 {
00077 return $this->xml_base;
00078 }
00079
00080 function setXmlBase($a_xml_base)
00081 {
00082 $this->xml_base = $a_xml_base;
00083 }
00084
00085 function read()
00086 {
00087 parent::read();
00088
00089 $q = "SELECT * FROM sc_manifest WHERE obj_id = '".$this->getId()."'";
00090
00091 $obj_set = $this->ilias->db->query($q);
00092 $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC);
00093 $this->setImportId($obj_rec["import_id"]);
00094 $this->setVersion($obj_rec["version"]);
00095 $this->setXmlBase($obj_rec["xml_base"]);
00096 }
00097
00098 function create()
00099 {
00100 parent::create();
00101
00102 $q = "INSERT INTO sc_manifest (obj_id, import_id, version, xml_base) VALUES ".
00103 "('".$this->getId()."', '".$this->getImportId().
00104 "', '".$this->getVersion()."', '".$this->getXmlBase()."')";
00105 $this->ilias->db->query($q);
00106 }
00107
00108 function update()
00109 {
00110 parent::update();
00111
00112 $q = "UPDATE sc_manifest SET ".
00113 "import_id = '".$this->getImportId()."', ".
00114 "version = '".$this->getVersion()."', ".
00115 "xml_base = '".$this->getXmlBase()."' ".
00116 "WHERE obj_id = '".$this->getId()."'";
00117 $this->ilias->db->query($q);
00118 }
00119
00120 function delete()
00121 {
00122 global $ilDB;
00123
00124 parent::delete();
00125
00126 $q = "DELETE FROM sc_manifest WHERE obj_id =".$ilDB->quote($this->getId());
00127 $ilDB->query($q);
00128 }
00129
00130 }
00131 ?>