ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups 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.
 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

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:
class.ilAICCObject.php 21335 2009-08-28 10:00:30Z mjansen

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

Member Function Documentation

& 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.

{
global $ilDB;
$sc_set = $ilDB->queryF('
SELECT c_type FROM aicc_object
WHERE obj_id = %s
AND slm_id = %s',
array('integer', 'integer'),
array($a_id,$a_slm_id)
);
while($sc_rec = $ilDB->fetchAssoc($sc_set))
{
break;
}
switch($sc_rec["c_type"])
{
case "sbl": // Block
include_once("./Modules/ScormAicc/classes/AICC/class.ilAICCBlock.php");
$block =& new ilAICCBlock($a_id);
return $block;
break;
case "sau": // assignable unit
include_once("./Modules/ScormAicc/classes/AICC/class.ilAICCUnit.php");
$sau =& new ilAICCUnit($a_id);
return $sau;
break;
case "shd": // course
include_once("./Modules/ScormAicc/classes/AICC/class.ilAICCCourse.php");
$shd =& new ilAICCCourse($a_id);
return $shd;
break;
}
}
ilAICCObject::create ( )

Reimplemented in ilAICCCourse, and ilAICCUnit.

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

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

{
global $ilDB;
$nextId = $ilDB->nextId('aicc_object');
$ilDB->insert('aicc_object', array(
'obj_id' => array('integer', $nextId),
'title' => array('text', $this->getTitle()),
'c_type' => array('text', $this->getType()),
'slm_id' => array('integer', $this->getALMId()),
'description' => array('clob', $this->getDescription()),
'developer_id' => array('text',$this->getDeveloperId()),
'system_id' => array('integer', $this->getSystemId())
));
$this->setId($nextId);
}

+ Here is the call graph for this function:

ilAICCObject::delete ( )

Reimplemented in ilAICCCourse, and ilAICCUnit.

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

References $ilDB, and getId().

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

+ Here is the call graph for this function:

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().

{
return $this->alm_id;
}

+ Here is the caller graph for this function:

ilAICCObject::getDescription ( )

Reimplemented in ilAICCCourse.

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

References $description.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilAICCObject::getDeveloperId ( )

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

References $developer_id.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilAICCObject::getSystemId ( )

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

References $system_id.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilAICCObject::getTitle ( )

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

References $title.

Referenced by create(), and update().

{
return $this->title;
}

+ Here is the caller graph for this function:

ilAICCObject::getType ( )

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

References $objType.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilAICCObject::ilAICCObject (   $a_id = 0)

Constructor.

Parameters
int$a_idObject ID public

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

References read().

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

{
global $ilias;
$this->ilias =& $ilias;
$this->id = $a_id;
if ($a_id > 0)
{
$this->read();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAICCObject::prepForStore (   $string)

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

{
if (!get_magic_quotes_runtime()) {
$string = addslashes($string);
}
return $string;
}
ilAICCObject::read ( )

Reimplemented in ilAICCCourse, and ilAICCUnit.

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

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

Referenced by ilAICCObject().

{
global $ilDB;
$obj_set = $ilDB->queryF('SELECT * FROM aicc_object WHERE obj_id = %s',
array('integer'),array($this->getId()));
while($obj_rec = $ilDB->fetchAssoc($obj_set))
{
$this->setTitle($obj_rec["title"]);
$this->setType($obj_rec["c_type"]);
$this->setALMId($obj_rec["alm_id"]);
$this->setDescription($obj_rec["description"]);
$this->setDeveloperId($obj_rec["developer_id"]);
$this->setSystemId($obj_rec["system_id"]);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAICCObject::setALMId (   $a_alm_id)

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

Referenced by read().

{
$this->alm_id = $a_alm_id;
}

+ Here is the caller graph for this function:

ilAICCObject::setDescription (   $a_description)

Reimplemented in ilAICCCourse.

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

Referenced by read().

{
$this->description = $a_description;
}

+ Here is the caller graph for this function:

ilAICCObject::setDeveloperId (   $a_developer_id)

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

Referenced by read().

{
$this->developer_id = $a_developer_id;
}

+ Here is the caller graph for this function:

ilAICCObject::setId (   $a_id)

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

Referenced by create().

{
$this->id = $a_id;
}

+ Here is the caller graph for this function:

ilAICCObject::setSystemId (   $a_system_id)

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

Referenced by read().

{
$this->system_id = $a_system_id;
}

+ Here is the caller graph for this function:

ilAICCObject::setTitle (   $a_title)

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

Referenced by read().

{
$this->title = $a_title;
}

+ Here is the caller graph for this function:

ilAICCObject::setType (   $a_objType)

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

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

{
$this->objType = $a_objType;
}

+ Here is the caller graph for this function:

ilAICCObject::update ( )

Reimplemented in ilAICCCourse, and ilAICCUnit.

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

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

{
global $ilDB;
$ilDB->update('aicc_object',
array(
'title' => array('text', $this->getTitle()),
'c_type' => array('text', $this->getType()),
'slm_id' => array('integer', $this->getALMId()),
'description' => array('clob', $this->getDescription()),
'developer_id' => array('text',$this->getDeveloperId()),
'system_id' => array('integer', $this->getSystemId())
),
array(
'obj_id' => array('integer', $this->getId())
)
);
}

+ Here is the call graph for this function:

Field Documentation

ilAICCObject::$alm_id

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

Referenced by getALMId().

ilAICCObject::$description

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

Referenced by getDescription().

ilAICCObject::$developer_id

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

Referenced by getDeveloperId().

ilAICCObject::$id

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

Referenced by getId().

ilAICCObject::$objType

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

Referenced by getType().

ilAICCObject::$system_id

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

Referenced by getSystemId().

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: