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 ilSCORMOrganization extends ilSCORMObject
00036 {
00037 var $import_id;
00038 var $structure;
00039
00040
00047 function ilSCORMOrganization($a_id = 0)
00048 {
00049 parent::ilSCORMObject($a_id);
00050 $this->setType("sor");
00051 }
00052
00053 function getImportId()
00054 {
00055 return $this->import_id;
00056 }
00057
00058 function setImportId($a_import_id)
00059 {
00060 $this->import_id = $a_import_id;
00061 }
00062
00063 function getStructure()
00064 {
00065 return $this->structure;
00066 }
00067
00068 function setStructure($a_structure)
00069 {
00070 $this->structure = $a_structure;
00071 }
00072
00073 function read()
00074 {
00075 parent::read();
00076
00077 $q = "SELECT * FROM sc_organization WHERE obj_id = '".$this->getId()."'";
00078
00079 $obj_set = $this->ilias->db->query($q);
00080 $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC);
00081 $this->setImportId($obj_rec["import_id"]);
00082 $this->setStructure($obj_rec["structure"]);
00083 }
00084
00085 function create()
00086 {
00087 parent::create();
00088
00089 $q = "INSERT INTO sc_organization (obj_id, import_id, structure) VALUES ".
00090 "('".$this->getId()."', '".$this->getImportId()."','".$this->getStructure()."')";
00091 $this->ilias->db->query($q);
00092 }
00093
00094 function update()
00095 {
00096 parent::update();
00097
00098 $q = "UPDATE sc_organization SET ".
00099 "import_id = '".$this->getImportId()."', ".
00100 "structure = '".$this->getStructure()."' ".
00101 "WHERE obj_id = '".$this->getId()."'";
00102 $this->ilias->db->query($q);
00103 }
00104
00105 function delete()
00106 {
00107 global $ilDB;
00108
00109 parent::delete();
00110
00111 $q = "DELETE FROM sc_organization WHERE obj_id =".$ilDB->quote($this->getId());
00112 $ilDB->query($q);
00113 }
00114
00115 }
00116 ?>