ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSParticipantSetting Class Reference
+ Collaboration diagram for ilECSParticipantSetting:

Public Member Functions

 __construct ($a_server_id, $mid)
 Constructor.
 getServerId ()
 Get server id.
 setMid ($a_mid)
 getMid ()
 enableExport ($a_status)
 isExportEnabled ()
 enableImport ($a_status)
 isImportEnabled ()
 setImportType ($a_type)
 getImportType ()
 setTitle ($a_title)
 getTitle ()
 getCommunityName ()
 setCommunityName ($a_name)
 update ()
 Update Calls create automatically when no entry exists.
 delete ()
 Delete one participant entry <type> $ilDB.
 read ()
 Read stored entry.

Static Public Member Functions

static getInstance ($a_server_id, $mid)
 Get instance by server id and mid.
static deleteByServerId ($a_server_id)

Data Fields

const IMPORT_UNCHANGED = 0
const IMPORT_RCRS = 1
const IMPORT_CRS = 2
const IMPORT_CMS = 3

Static Protected Attributes

static $instances = array()

Private Member Functions

 exists ()
 create ()

Private Attributes

 $server_id = 0
 $mid = 0
 $export = false
 $import = false
 $import_type = 1
 $title = ''
 $cname = ''
 $exists = false

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

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

Constructor & Destructor Documentation

ilECSParticipantSetting::__construct (   $a_server_id,
  $mid 
)

Constructor.

private

Definition at line 61 of file class.ilECSParticipantSetting.php.

References $mid, and read().

{
$this->server_id = $a_server_id;
$this->mid = $mid;
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilECSParticipantSetting::create ( )
private

Definition at line 188 of file class.ilECSParticipantSetting.php.

References $query, getCommunityName(), getImportType(), getMid(), getServerId(), getTitle(), isExportEnabled(), and isImportEnabled().

Referenced by update().

{
global $ilDB;
$query = 'INSERT INTO ecs_part_settings '.
'(sid,mid,export,import,import_type,title,cname) '.
'VALUES( '.
$ilDB->quote($this->getServerId(),'integer').', '.
$ilDB->quote($this->getMid(),'integer').', '.
$ilDB->quote((int) $this->isExportEnabled(),'integer').', '.
$ilDB->quote((int) $this->isImportEnabled(),'integer').', '.
$ilDB->quote((int) $this->getImportType(),'integer').', '.
$ilDB->quote($this->getTitle(),'text').', '.
$ilDB->quote($this->getCommunityName(),'text').' '.
')';
$aff = $ilDB->manipulate($query);
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSParticipantSetting::delete ( )

Delete one participant entry <type> $ilDB.

Returns
<type>

Definition at line 213 of file class.ilECSParticipantSetting.php.

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

{
global $ilDB;
$query = 'DELETE FROM ecs_part_settings '.
'WHERE sid = '.$ilDB->quote($this->getServerId(),'integer').' '.
'AND mid = '.$ilDB->quote($this->getMid(),'integer');
$ilDB->manipulate($query);
return true;
}

+ Here is the call graph for this function:

static ilECSParticipantSetting::deleteByServerId (   $a_server_id)
static

Definition at line 251 of file class.ilECSParticipantSetting.php.

References $query.

Referenced by ilECSSetting\delete().

{
global $ilDB;
$query = 'DELETE FROM ecs_events'.
' WHERE server_id = '.$ilDB->quote($a_server_id,'integer');
$ilDB->manipulate($query);
return true;
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::enableExport (   $a_status)

Definition at line 103 of file class.ilECSParticipantSetting.php.

Referenced by read().

{
$this->export = $a_status;
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::enableImport (   $a_status)

Definition at line 113 of file class.ilECSParticipantSetting.php.

Referenced by read().

{
$this->import = $a_status;
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::exists ( )
private

Definition at line 156 of file class.ilECSParticipantSetting.php.

References $exists.

Referenced by read(), and update().

{
return $this->exists;
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::getCommunityName ( )

Definition at line 146 of file class.ilECSParticipantSetting.php.

References $cname.

Referenced by create(), and update().

{
return $this->cname;
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::getImportType ( )

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

References $import_type.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

static ilECSParticipantSetting::getInstance (   $a_server_id,
  $mid 
)
static

Get instance by server id and mid.

Parameters
type$a_server_id
type$mid
Returns
ilECSParticipantSetting

Definition at line 74 of file class.ilECSParticipantSetting.php.

References $mid.

Referenced by ilECSCmsCourseCommandQueueHandler\checkAllocationActivation(), and ilECSCmsCourseMemberCommandQueueHandler\checkAllocationActivation().

{
if(self::$instances[$a_server_id.'_'.$mid])
{
return self::$instances[$a_server_id.'_'.$mid];
}
return self::$instances[$a_server_id.'_'.$mid] = new self($a_server_id,$mid);
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::getMid ( )

Definition at line 98 of file class.ilECSParticipantSetting.php.

References $mid.

Referenced by create(), delete(), read(), and update().

{
return $this->mid;
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::getServerId ( )

Get server id.

Returns
int

Definition at line 88 of file class.ilECSParticipantSetting.php.

References $server_id.

Referenced by create(), delete(), read(), and update().

{
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::getTitle ( )

Definition at line 141 of file class.ilECSParticipantSetting.php.

References $title.

Referenced by create(), and update().

{
return $this->title;
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::isExportEnabled ( )

Definition at line 108 of file class.ilECSParticipantSetting.php.

References $export.

Referenced by create(), and update().

{
return (bool) $this->export;
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::isImportEnabled ( )

Definition at line 118 of file class.ilECSParticipantSetting.php.

References $import.

Referenced by create(), and update().

{
return $this->import;
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::read ( )

Read stored entry.

Returns
<type>

Definition at line 228 of file class.ilECSParticipantSetting.php.

References $query, $res, $row, DB_FETCHMODE_OBJECT, enableExport(), enableImport(), exists(), getMid(), getServerId(), setCommunityName(), setImportType(), and setTitle().

Referenced by __construct().

{
global $ilDB;
$query = 'SELECT * FROM ecs_part_settings '.
'WHERE sid = '.$ilDB->quote($this->getServerId(),'integer').' '.
'AND mid = '.$ilDB->quote($this->getMid(),'integer');
$res = $ilDB->query($query);
$this->exists = ($res->numRows() ? true : false);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->enableExport($row->export);
$this->enableImport($row->import);
$this->setImportType($row->import_type);
$this->setTitle($row->title);
$this->setCommunityName($row->cname);
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSParticipantSetting::setCommunityName (   $a_name)

Definition at line 151 of file class.ilECSParticipantSetting.php.

Referenced by read().

{
$this->cname = $a_name;
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::setImportType (   $a_type)

Definition at line 123 of file class.ilECSParticipantSetting.php.

Referenced by read().

{
if($a_type != self::IMPORT_UNCHANGED)
{
$this->import_type = $a_type;
}
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::setMid (   $a_mid)

Definition at line 93 of file class.ilECSParticipantSetting.php.

{
$this->mid = $a_mid;
}
ilECSParticipantSetting::setTitle (   $a_title)

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

Referenced by read().

{
$this->title = $a_title;
}

+ Here is the caller graph for this function:

ilECSParticipantSetting::update ( )

Update Calls create automatically when no entry exists.

Definition at line 165 of file class.ilECSParticipantSetting.php.

References $query, create(), exists(), getCommunityName(), getImportType(), getMid(), getServerId(), getTitle(), isExportEnabled(), and isImportEnabled().

{
global $ilDB;
if(!$this->exists())
{
return $this->create();
}
$query = 'UPDATE ecs_part_settings '.
'SET '.
'sid = '.$ilDB->quote((int) $this->getServerId(),'integer').', '.
'mid = '.$ilDB->quote((int) $this->getMid(),'integer').', '.
'export = '.$ilDB->quote((int) $this->isExportEnabled(),'integer').', '.
'import = '.$ilDB->quote((int) $this->isImportEnabled(),'integer').', '.
'import_type = '.$ilDB->quote((int) $this->getImportType(),'integer').', '.
'title = '.$ilDB->quote($this->getTitle(),'text').', '.
'cname = '.$ilDB->quote($this->getCommunityName(),'text').' '.
'WHERE sid = '.$ilDB->quote((int) $this->getServerId(),'integer').' '.
'AND mid = '.$ilDB->quote((int) $this->getMid(),'integer');
$aff = $ilDB->manipulate($query);
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilECSParticipantSetting::$cname = ''
private

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

Referenced by getCommunityName().

ilECSParticipantSetting::$exists = false
private

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

Referenced by exists().

ilECSParticipantSetting::$export = false
private

Definition at line 45 of file class.ilECSParticipantSetting.php.

Referenced by isExportEnabled().

ilECSParticipantSetting::$import = false
private

Definition at line 46 of file class.ilECSParticipantSetting.php.

Referenced by isImportEnabled().

ilECSParticipantSetting::$import_type = 1
private

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

Referenced by getImportType().

ilECSParticipantSetting::$instances = array()
staticprotected

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

ilECSParticipantSetting::$mid = 0
private

Definition at line 44 of file class.ilECSParticipantSetting.php.

Referenced by __construct(), getInstance(), and getMid().

ilECSParticipantSetting::$server_id = 0
private

Definition at line 43 of file class.ilECSParticipantSetting.php.

Referenced by getServerId().

ilECSParticipantSetting::$title = ''
private

Definition at line 48 of file class.ilECSParticipantSetting.php.

Referenced by getTitle().

const ilECSParticipantSetting::IMPORT_CMS = 3
const ilECSParticipantSetting::IMPORT_CRS = 2

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

Referenced by ilECSCommunityTableGUI\fillRow().

const ilECSParticipantSetting::IMPORT_RCRS = 1

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

Referenced by ilECSCommunityTableGUI\fillRow().

const ilECSParticipantSetting::IMPORT_UNCHANGED = 0

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