ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilAICCObject Class Reference

Parent object for all AICC objects, that are stored in table aicc_object. More...

+ Inheritance diagram for ilAICCObject:
+ Collaboration diagram for ilAICCObject:

Public Member Functions

 __construct ($a_id=0)
 Constructor. More...
 
 getId ()
 
 setId ($a_id)
 
 getType ()
 
 setType ($a_objType)
 
 getTitle ()
 
 setTitle ($a_title)
 
 getDescription ()
 
 setDescription ($a_description)
 
 getDeveloperId ()
 
 setDeveloperId ($a_developer_id)
 
 getSystemId ()
 
 setSystemId ($a_system_id)
 
 getALMId ()
 
 setALMId ($a_alm_id)
 
 prepForStore ($string)
 
 read ()
 
 create ()
 
 update ()
 
 delete ()
 
_getInstance ($a_id, $a_slm_id)
 get instance of specialized GUI class More...
 

Data Fields

 $id
 
 $title
 
 $objType
 
 $alm_id
 
 $description
 
 $developer_id
 
 $system_id
 

Detailed Description

Parent object for all AICC objects, that are stored in table aicc_object.

Version
$Id$

Definition at line 32 of file class.ilAICCObject.php.

Constructor & Destructor Documentation

◆ __construct()

ilAICCObject::__construct (   $a_id = 0)

Constructor.

Parameters
int$a_idObject ID @access public

Reimplemented in ilAICCBlock, ilAICCCourse, and ilAICCUnit.

Definition at line 49 of file class.ilAICCObject.php.

50 {
51 global $ilias;
52
53 $this->ilias = $ilias;
54 $this->id = $a_id;
55 if ($a_id > 0)
56 {
57 $this->read();
58 }
59 }
redirection script todo: (a better solution should control the processing via a xml file)

References read().

+ Here is the call graph for this function:

Member Function Documentation

◆ _getInstance()

& ilAICCObject::_getInstance (   $a_id,
  $a_slm_id 
)

get instance of specialized GUI class

static

Definition at line 204 of file class.ilAICCObject.php.

205 {
206 global $ilDB;
207
208 $sc_set = $ilDB->queryF('
209 SELECT c_type FROM aicc_object
210 WHERE obj_id = %s
211 AND slm_id = %s',
212 array('integer', 'integer'),
213 array($a_id,$a_slm_id)
214 );
215
216 while($sc_rec = $ilDB->fetchAssoc($sc_set))
217 {
218 break;
219 }
220
221 switch($sc_rec["c_type"])
222 {
223 case "sbl": // Block
224 include_once("./Modules/ScormAicc/classes/AICC/class.ilAICCBlock.php");
225 $block = new ilAICCBlock($a_id);
226 return $block;
227 break;
228
229 case "sau": // assignable unit
230 include_once("./Modules/ScormAicc/classes/AICC/class.ilAICCUnit.php");
231 $sau = new ilAICCUnit($a_id);
232 return $sau;
233 break;
234
235 case "shd": // course
236 include_once("./Modules/ScormAicc/classes/AICC/class.ilAICCCourse.php");
237 $shd = new ilAICCCourse($a_id);
238 return $shd;
239 break;
240 }
241
242 }
global $ilDB

References $ilDB.

◆ create()

ilAICCObject::create ( )

Reimplemented in ilAICCCourse, and ilAICCUnit.

Definition at line 153 of file class.ilAICCObject.php.

154 {
155 global $ilDB;
156
157 $nextId = $ilDB->nextId('aicc_object');
158
159 $ilDB->insert('aicc_object', array(
160 'obj_id' => array('integer', $nextId),
161 'title' => array('text', $this->getTitle()),
162 'c_type' => array('text', $this->getType()),
163 'slm_id' => array('integer', $this->getALMId()),
164 'description' => array('clob', $this->getDescription()),
165 'developer_id' => array('text',$this->getDeveloperId()),
166 'system_id' => array('integer', $this->getSystemId())
167 ));
168
169 $this->setId($nextId);
170 }

References $ilDB, getALMId(), getDescription(), getDeveloperId(), getSystemId(), getTitle(), getType(), and setId().

+ Here is the call graph for this function:

◆ delete()

ilAICCObject::delete ( )

Reimplemented in ilAICCCourse, and ilAICCUnit.

Definition at line 191 of file class.ilAICCObject.php.

192 {
193 global $ilDB;
194
195 $statement = $ilDB->manipulateF('DELETE FROM aicc_object WHERE obj_id = %s',
196 array('integer'),array($this->getId()));
197 }

References $ilDB, and getId().

+ Here is the call graph for this function:

◆ getALMId()

ilAICCObject::getALMId ( )

Definition at line 121 of file class.ilAICCObject.php.

122 {
123 return $this->alm_id;
124 }

References $alm_id.

Referenced by create(), ilAICCCourse\delete(), ilAICCUnit\delete(), ilAICCCourse\getTrackingDataOfUser(), ilAICCUnit\getTrackingDataOfUser(), and update().

+ Here is the caller graph for this function:

◆ getDescription()

ilAICCObject::getDescription ( )

Reimplemented in ilAICCCourse.

Definition at line 91 of file class.ilAICCObject.php.

92 {
93 return $this->description;
94 }

References $description.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getDeveloperId()

ilAICCObject::getDeveloperId ( )

Definition at line 101 of file class.ilAICCObject.php.

102 {
103 return $this->developer_id;
104 }

References $developer_id.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getId()

◆ getSystemId()

ilAICCObject::getSystemId ( )

Definition at line 111 of file class.ilAICCObject.php.

112 {
113 return $this->system_id;
114 }

References $system_id.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getTitle()

ilAICCObject::getTitle ( )

Definition at line 81 of file class.ilAICCObject.php.

82 {
83 return $this->title;
84 }

References $title.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getType()

ilAICCObject::getType ( )

Definition at line 71 of file class.ilAICCObject.php.

72 {
73 return $this->objType;
74 }

References $objType.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ prepForStore()

ilAICCObject::prepForStore (   $string)

Definition at line 131 of file class.ilAICCObject.php.

131 {
132 $string = addslashes($string);
133 return $string;
134 }

◆ read()

ilAICCObject::read ( )

Reimplemented in ilAICCCourse, and ilAICCUnit.

Definition at line 136 of file class.ilAICCObject.php.

137 {
138 global $ilDB;
139
140 $obj_set = $ilDB->queryF('SELECT * FROM aicc_object WHERE obj_id = %s',
141 array('integer'),array($this->getId()));
142 while($obj_rec = $ilDB->fetchAssoc($obj_set))
143 {
144 $this->setTitle($obj_rec["title"]);
145 $this->setType($obj_rec["c_type"]);
146 $this->setALMId($obj_rec["alm_id"]);
147 $this->setDescription($obj_rec["description"]);
148 $this->setDeveloperId($obj_rec["developer_id"]);
149 $this->setSystemId($obj_rec["system_id"]);
150 }
151 }
setSystemId($a_system_id)
setType($a_objType)
setDeveloperId($a_developer_id)
setDescription($a_description)

References $ilDB, getId(), setALMId(), setDescription(), setDeveloperId(), setSystemId(), setTitle(), and setType().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setALMId()

ilAICCObject::setALMId (   $a_alm_id)

Definition at line 126 of file class.ilAICCObject.php.

127 {
128 $this->alm_id = $a_alm_id;
129 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDescription()

ilAICCObject::setDescription (   $a_description)

Reimplemented in ilAICCCourse.

Definition at line 96 of file class.ilAICCObject.php.

97 {
98 $this->description = $a_description;
99 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDeveloperId()

ilAICCObject::setDeveloperId (   $a_developer_id)

Definition at line 106 of file class.ilAICCObject.php.

107 {
108 $this->developer_id = $a_developer_id;
109 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setId()

ilAICCObject::setId (   $a_id)

Definition at line 66 of file class.ilAICCObject.php.

67 {
68 $this->id = $a_id;
69 }

Referenced by create().

+ Here is the caller graph for this function:

◆ setSystemId()

ilAICCObject::setSystemId (   $a_system_id)

Definition at line 116 of file class.ilAICCObject.php.

117 {
118 $this->system_id = $a_system_id;
119 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setTitle()

ilAICCObject::setTitle (   $a_title)

Definition at line 86 of file class.ilAICCObject.php.

87 {
88 $this->title = $a_title;
89 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setType()

ilAICCObject::setType (   $a_objType)

Definition at line 76 of file class.ilAICCObject.php.

77 {
78 $this->objType = $a_objType;
79 }

Referenced by ilAICCCourse\__construct(), ilAICCUnit\__construct(), and read().

+ Here is the caller graph for this function:

◆ update()

ilAICCObject::update ( )

Reimplemented in ilAICCCourse, and ilAICCUnit.

Definition at line 172 of file class.ilAICCObject.php.

173 {
174 global $ilDB;
175
176 $ilDB->update('aicc_object',
177 array(
178 'title' => array('text', $this->getTitle()),
179 'c_type' => array('text', $this->getType()),
180 'slm_id' => array('integer', $this->getALMId()),
181 'description' => array('clob', $this->getDescription()),
182 'developer_id' => array('text',$this->getDeveloperId()),
183 'system_id' => array('integer', $this->getSystemId())
184 ),
185 array(
186 'obj_id' => array('integer', $this->getId())
187 )
188 );
189 }

References $ilDB, getALMId(), getDescription(), getDeveloperId(), getId(), getSystemId(), getTitle(), and getType().

+ Here is the call graph for this function:

Field Documentation

◆ $alm_id

ilAICCObject::$alm_id

Definition at line 37 of file class.ilAICCObject.php.

Referenced by getALMId().

◆ $description

ilAICCObject::$description

Definition at line 38 of file class.ilAICCObject.php.

Referenced by getDescription().

◆ $developer_id

ilAICCObject::$developer_id

Definition at line 39 of file class.ilAICCObject.php.

Referenced by getDeveloperId().

◆ $id

ilAICCObject::$id

Definition at line 34 of file class.ilAICCObject.php.

Referenced by getId().

◆ $objType

ilAICCObject::$objType

Definition at line 36 of file class.ilAICCObject.php.

Referenced by getType().

◆ $system_id

ilAICCObject::$system_id

Definition at line 40 of file class.ilAICCObject.php.

Referenced by getSystemId().

◆ $title

ilAICCObject::$title

Definition at line 35 of file class.ilAICCObject.php.

Referenced by getTitle().


The documentation for this class was generated from the following file: