ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSCourseAttribute Class Reference

Storage of course attributes for assignment rules. More...

+ Collaboration diagram for ilECSCourseAttribute:

Public Member Functions

 __construct ($a_id=0)
 Constructor.
 getId ()
 Get id.
 setServerId ($a_server_id)
 getServerId ()
 setMid ($a_mid)
 getMid ()
 setName ($a_name)
 getName ()
 Get name.
 delete ()
 Delete attribute type $ilDB.
 save ()
 Save a new entry type $ilDB.

Protected Member Functions

 read ()
 read active attributes

Private Attributes

 $id = 0
 $server_id = 0
 $mid = 0
 $name = ''

Detailed Description

Storage of course attributes for assignment rules.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

Definition at line 10 of file class.ilECSCourseAttribute.php.

Constructor & Destructor Documentation

ilECSCourseAttribute::__construct (   $a_id = 0)

Constructor.

Parameters
int$attribute_id

Definition at line 21 of file class.ilECSCourseAttribute.php.

References read().

{
$this->id = $a_id;
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilECSCourseAttribute::delete ( )

Delete attribute type $ilDB.

Returns
boolean

Definition at line 77 of file class.ilECSCourseAttribute.php.

References $query, and getId().

{
global $ilDB;
$query = "DELETE FROM ecs_crs_mapping_atts ".
'WHERE id = '.$ilDB->quote($this->getId(),'integer');
$ilDB->manipulate($query);
return true;
}

+ Here is the call graph for this function:

ilECSCourseAttribute::getId ( )

Get id.

Returns
int

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

References $id.

Referenced by delete(), read(), and save().

{
return $this->id;
}

+ Here is the caller graph for this function:

ilECSCourseAttribute::getMid ( )

Definition at line 52 of file class.ilECSCourseAttribute.php.

References $mid.

Referenced by save().

{
return $this->mid;
}

+ Here is the caller graph for this function:

ilECSCourseAttribute::getName ( )

Get name.

Returns
type

Definition at line 67 of file class.ilECSCourseAttribute.php.

References $name.

Referenced by save().

{
return $this->name;
}

+ Here is the caller graph for this function:

ilECSCourseAttribute::getServerId ( )

Definition at line 42 of file class.ilECSCourseAttribute.php.

References $server_id.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilECSCourseAttribute::read ( )
protected

read active attributes

Definition at line 114 of file class.ilECSCourseAttribute.php.

References $query, $res, $row, DB_FETCHMODE_OBJECT, getId(), and setName().

Referenced by __construct().

{
global $ilDB;
if(!$this->getId())
{
return true;
}
$query = 'SELECT * FROM ecs_crs_mapping_atts '.
'WHERE id = '.$ilDB->quote($this->getId(),'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->setName($row->name);
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSCourseAttribute::save ( )

Save a new entry type $ilDB.

Returns
boolean

Definition at line 92 of file class.ilECSCourseAttribute.php.

References $query, getId(), getMid(), getName(), and getServerId().

{
global $ilDB;
$this->id = $ilDB->nextId('ecs_crs_mapping_atts');
$query = 'INSERT INTO ecs_crs_mapping_atts (id,sid,mid,name) '.
'VALUES ( '.
$ilDB->quote($this->getId(),'integer').', '.
$ilDB->quote($this->getServerId(),'integer').', '.
$ilDB->quote($this->getMid(),'integer').', '.
$ilDB->quote($this->getName(),'text').' '.
') ';
$ilDB->manipulate($query);
return true;
}

+ Here is the call graph for this function:

ilECSCourseAttribute::setMid (   $a_mid)

Definition at line 47 of file class.ilECSCourseAttribute.php.

{
$this->mid = $a_mid;
}
ilECSCourseAttribute::setName (   $a_name)

Definition at line 58 of file class.ilECSCourseAttribute.php.

Referenced by read().

{
$this->name = $a_name;
}

+ Here is the caller graph for this function:

ilECSCourseAttribute::setServerId (   $a_server_id)

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

{
$this->server_id = $a_server_id;
}

Field Documentation

ilECSCourseAttribute::$id = 0
private

Definition at line 12 of file class.ilECSCourseAttribute.php.

Referenced by getId().

ilECSCourseAttribute::$mid = 0
private

Definition at line 14 of file class.ilECSCourseAttribute.php.

Referenced by getMid().

ilECSCourseAttribute::$name = ''
private

Definition at line 15 of file class.ilECSCourseAttribute.php.

Referenced by getName().

ilECSCourseAttribute::$server_id = 0
private

Definition at line 13 of file class.ilECSCourseAttribute.php.

Referenced by getServerId().


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