ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
class.ilSCORMManifest.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 require_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMObject.php");
25 
35 {
37  var $version;
38  var $xml_base;
39 
40 
47  function ilSCORMManifest($a_id = 0)
48  {
49  parent::ilSCORMObject($a_id);
50  $this->setType("sma");
51  }
52 
53  function getImportId()
54  {
55  return $this->import_id;
56  }
57 
58  function setImportId($a_import_id)
59  {
60  $this->import_id = $a_import_id;
61  $this->setTitle($a_import_id);
62  }
63 
64  function getVersion()
65  {
66  return $this->version;
67  }
68 
69  function setVersion($a_version)
70  {
71  $this->version = $a_version;
72  }
73 
74  function getXmlBase()
75  {
76  return $this->xml_base;
77  }
78 
79  function setXmlBase($a_xml_base)
80  {
81  $this->xml_base = $a_xml_base;
82  }
83 
84  function read()
85  {
86  global $ilDB;
87 
88  parent::read();
89 
90  $obj_set = $ilDB->queryF('SELECT * FROM sc_manifest WHERE obj_id = %s',
91  array('integer'),array($this->getId()));
92  $obj_rec = $ilDB->fetchAssoc($obj_set);
93 
94  $this->setImportId($obj_rec["import_id"]);
95  $this->setVersion($obj_rec["version"]);
96  $this->setXmlBase($obj_rec["xml_base"]);
97  }
98 
99  function create()
100  {
101  global $ilDB;
102 
103  parent::create();
104 
105  $ilDB->manipulateF('
106  INSERT INTO sc_manifest (obj_id, import_id, version, xml_base)
107  VALUES (%s,%s,%s,%s)',
108  array('integer','text','text','text'),
109  array($this->getId(),$this->getImportId(),$this->getVersion(),$this->getXmlBase()));
110 
111  }
112 
113  function update()
114  {
115  global $ilDB;
116 
117  parent::update();
118 
119  $ilDB->manipulateF('
120  UPDATE sc_manifest
121  SET import_id = %s,
122  version = %s,
123  xml_base = %s
124  WHERE obj_id = %s',
125  array('text','text','text','integer'),
126  array($this->getImportId(),$this->getVersion(),$this->getXmlBase(),$this->getId()));
127 
128  }
129 
130  function delete()
131  {
132  global $ilDB;
133 
134  parent::delete();
135 
136  $ilDB->manipulateF('DELETE FROM sc_manifest WHERE obj_id = %s', array('integer'),array($this->getId()));
137  }
138 
139 }
140 ?>
Parent object for all SCORM objects, that are stored in table scorm_object.
setImportId($a_import_id)
ilSCORMManifest($a_id=0)
Constructor.
global $ilDB