ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
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

 ilAICCObject ($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.

Member Function Documentation

◆ _getInstance()

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

get instance of specialized GUI class

static

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

References $ilDB.

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

◆ create()

ilAICCObject::create ( )

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

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

156  {
157  global $ilDB;
158 
159  $nextId = $ilDB->nextId('aicc_object');
160 
161  $ilDB->insert('aicc_object', array(
162  'obj_id' => array('integer', $nextId),
163  'title' => array('text', $this->getTitle()),
164  'c_type' => array('text', $this->getType()),
165  'slm_id' => array('integer', $this->getALMId()),
166  'description' => array('clob', $this->getDescription()),
167  'developer_id' => array('text',$this->getDeveloperId()),
168  'system_id' => array('integer', $this->getSystemId())
169  ));
170 
171  $this->setId($nextId);
172  }
global $ilDB
+ Here is the call graph for this function:

◆ delete()

ilAICCObject::delete ( )

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

References $ilDB, and getId().

194  {
195  global $ilDB;
196 
197  $statement = $ilDB->manipulateF('DELETE FROM aicc_object WHERE obj_id = %s',
198  array('integer'),array($this->getId()));
199  }
global $ilDB
+ Here is the call graph for this function:

◆ getALMId()

ilAICCObject::getALMId ( )

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

References $alm_id.

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

122  {
123  return $this->alm_id;
124  }
+ Here is the caller graph for this function:

◆ getDescription()

ilAICCObject::getDescription ( )

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

References $description.

Referenced by create(), and update().

92  {
93  return $this->description;
94  }
+ Here is the caller graph for this function:

◆ getDeveloperId()

ilAICCObject::getDeveloperId ( )

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

References $developer_id.

Referenced by create(), and update().

102  {
103  return $this->developer_id;
104  }
+ Here is the caller graph for this function:

◆ getId()

◆ getSystemId()

ilAICCObject::getSystemId ( )

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

References $system_id.

Referenced by create(), and update().

112  {
113  return $this->system_id;
114  }
+ Here is the caller graph for this function:

◆ getTitle()

ilAICCObject::getTitle ( )

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

References $title.

Referenced by create(), and update().

82  {
83  return $this->title;
84  }
+ Here is the caller graph for this function:

◆ getType()

ilAICCObject::getType ( )

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

References $objType.

Referenced by create(), and update().

72  {
73  return $this->objType;
74  }
+ Here is the caller graph for this function:

◆ ilAICCObject()

ilAICCObject::ilAICCObject (   $a_id = 0)

Constructor.

Parameters
int$a_idObject ID public

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

References read().

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) ...
+ Here is the call graph for this function:

◆ prepForStore()

ilAICCObject::prepForStore (   $string)

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

131  {
132  if (!get_magic_quotes_runtime()) {
133  $string = addslashes($string);
134  }
135  return $string;
136  }

◆ read()

ilAICCObject::read ( )

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

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

Referenced by ilAICCObject().

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

Referenced by read().

127  {
128  $this->alm_id = $a_alm_id;
129  }
+ Here is the caller graph for this function:

◆ setDescription()

ilAICCObject::setDescription (   $a_description)

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

Referenced by read().

97  {
98  $this->description = $a_description;
99  }
+ Here is the caller graph for this function:

◆ setDeveloperId()

ilAICCObject::setDeveloperId (   $a_developer_id)

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

Referenced by read().

107  {
108  $this->developer_id = $a_developer_id;
109  }
+ Here is the caller graph for this function:

◆ setId()

ilAICCObject::setId (   $a_id)

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

Referenced by create().

67  {
68  $this->id = $a_id;
69  }
+ Here is the caller graph for this function:

◆ setSystemId()

ilAICCObject::setSystemId (   $a_system_id)

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

Referenced by read().

117  {
118  $this->system_id = $a_system_id;
119  }
+ Here is the caller graph for this function:

◆ setTitle()

ilAICCObject::setTitle (   $a_title)

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

Referenced by read().

87  {
88  $this->title = $a_title;
89  }
+ Here is the caller graph for this function:

◆ setType()

ilAICCObject::setType (   $a_objType)

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

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

77  {
78  $this->objType = $a_objType;
79  }
+ Here is the caller graph for this function:

◆ update()

ilAICCObject::update ( )

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

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

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