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