ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilEventParticipants Class Reference

class ilEventMembers More...

+ Collaboration diagram for ilEventParticipants:

Public Member Functions

 ilEventParticipants ($a_event_id)
 setUserId ($a_usr_id)
 getUserId ()
 setMark ($a_mark)
 getMark ()
 setComment ($a_comment)
 getComment ()
 setParticipated ($a_status)
 getParticipated ()
 setRegistered ($a_status)
 getRegistered ()
 updateUser ()
 getUser ($a_usr_id)
 getParticipants ()
 isRegistered ($a_usr_id)
 hasParticipated ($a_usr_id)
 updateParticipation ($a_usr_id, $a_status)
 _updateParticipation ($a_usr_id, $a_event_id, $a_status)
 _getRegistered ($a_event_id)
 _getParticipated ($a_event_id)
 _register ($a_usr_id, $a_event_id)
 register ($a_usr_id)
 _unregister ($a_usr_id, $a_event_id)
 unregister ($a_usr_id)
 _lookupMark ($a_event_id, $a_usr_id)
 _lookupComment ($a_event_id, $a_usr_id)
 getEventId ()
 setEventId ($a_event_id)
 _deleteByEvent ($a_event_id)
 _deleteByUser ($a_usr_id)
 __read ()

Static Public Member Functions

static _isRegistered ($a_usr_id, $a_event_id)

Data Fields

 $ilErr
 $ilDB
 $tree
 $lng
 $event_id = null

Detailed Description

class ilEventMembers

Author
Stefan Meyer smeye.nosp@m.r@da.nosp@m.tabay.nosp@m..de
Version
Id:
class.ilEventParticipants.php 15697 2008-01-08 20:04:33Z hschottm

Definition at line 33 of file class.ilEventParticipants.php.

Member Function Documentation

ilEventParticipants::__read ( )

Definition at line 345 of file class.ilEventParticipants.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and getEventId().

Referenced by ilEventParticipants().

{
global $ilDB;
$query = "SELECT * FROM event_participants ".
"WHERE event_id = ".$ilDB->quote($this->getEventId())." ";
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->participants[$row->usr_id]['usr_id'] = $row->usr_id;
$this->participants[$row->usr_id]['registered'] = $row->registered;
$this->participants[$row->usr_id]['participated'] = $row->participated;
$this->participants[$row->usr_id]['mark'] = $row->mark;
$this->participants[$row->usr_id]['comment'] = $row->e_comment;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilEventParticipants::_deleteByEvent (   $a_event_id)

Definition at line 324 of file class.ilEventParticipants.php.

References $ilDB, $query, and $res.

Referenced by ilObjSession\delete().

{
global $ilDB;
$query = "DELETE FROM event_participants ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ";
$res = $ilDB->manipulate($query);
return true;
}

+ Here is the caller graph for this function:

ilEventParticipants::_deleteByUser (   $a_usr_id)

Definition at line 333 of file class.ilEventParticipants.php.

References $ilDB, $query, and $res.

Referenced by ilObjUser\delete().

{
global $ilDB;
$query = "DELETE FROM event_participants ".
"WHERE usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->manipulate($query);
return true;
}

+ Here is the caller graph for this function:

ilEventParticipants::_getParticipated (   $a_event_id)

Definition at line 186 of file class.ilEventParticipants.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilLPStatusEvent\_getStatusInfo().

{
global $ilDB;
$query = "SELECT * FROM event_participants ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ".
"AND participated = 1";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$user_ids[] = $row->usr_id;
}
return $user_ids ? $user_ids : array();
}

+ Here is the caller graph for this function:

ilEventParticipants::_getRegistered (   $a_event_id)

Definition at line 171 of file class.ilEventParticipants.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilLPStatusEvent\_getStatusInfo().

{
global $ilDB;
$query = "SELECT * FROM event_participants ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ".
"AND registered = ".$ilDB->quote(1 ,'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$user_ids[] = $row->usr_id;
}
return $user_ids ? $user_ids : array();
}

+ Here is the caller graph for this function:

static ilEventParticipants::_isRegistered (   $a_usr_id,
  $a_event_id 
)
static

Definition at line 201 of file class.ilEventParticipants.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilObjSessionGUI\infoScreen(), ilObjSessionGUI\joinObject(), and ilObjSessionGUI\updateMembersObject().

{
global $ilDB;
$query = "SELECT * FROM event_participants ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ".
"AND usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return (bool) $row->registered;
}
return false;
}

+ Here is the caller graph for this function:

ilEventParticipants::_lookupComment (   $a_event_id,
  $a_usr_id 
)

Definition at line 299 of file class.ilEventParticipants.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilLPEventListGUI\__readComment().

{
global $ilDB;
$query = "SELECT * FROM event_participants ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ".
"AND usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->e_comment;
}
return '';
}

+ Here is the caller graph for this function:

ilEventParticipants::_lookupMark (   $a_event_id,
  $a_usr_id 
)

Definition at line 284 of file class.ilEventParticipants.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilLPEventListGUI\__readMark().

{
global $ilDB;
$query = "SELECT * FROM event_participants ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ".
"AND usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->mark;
}
return '';
}

+ Here is the caller graph for this function:

ilEventParticipants::_register (   $a_usr_id,
  $a_event_id 
)

Definition at line 216 of file class.ilEventParticipants.php.

References $ilDB, $query, and $res.

Referenced by ilObjSessionGUI\joinObject(), register(), and ilObjSessionGUI\registerObject().

{
global $ilDB;
$query = "SELECT * FROM event_participants ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ".
"AND usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->query($query);
if($res->numRows())
{
$query = "UPDATE event_participants ".
"SET registered = '1' ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ".
"AND usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->manipulate($query);
}
else
{
$query = "INSERT INTO event_participants (registered,participated,event_id,usr_id) ".
"VALUES( ".
"1, ".
"0, ".
$ilDB->quote($a_event_id ,'integer').", ".
$ilDB->quote($a_usr_id ,'integer')." ".
")";
$res = $ilDB->manipulate($query);
}
return true;
}

+ Here is the caller graph for this function:

ilEventParticipants::_unregister (   $a_usr_id,
  $a_event_id 
)

Definition at line 250 of file class.ilEventParticipants.php.

References $ilDB, $query, and $res.

Referenced by ilObjSessionGUI\joinObject(), unregister(), and ilObjSessionGUI\unregisterObject().

{
global $ilDB;
$query = "SELECT * FROM event_participants ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ".
"AND usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->query($query);
if($res->numRows())
{
$query = "UPDATE event_participants ".
"SET registered = 0 ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ".
"AND usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->manipulate($query);
}
else
{
$query = "INSERT INTO event_participants (registered,participated,event_id,usr_id) ".
"VALUES( ".
"0, ".
"0, ".
$ilDB->quote($a_event_id ,'integer').", ".
$ilDB->quote($a_usr_id ,'integer')." ".
")";
$res = $ilDB->manipulate($query);
}
return true;
}

+ Here is the caller graph for this function:

ilEventParticipants::_updateParticipation (   $a_usr_id,
  $a_event_id,
  $a_status 
)

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

References $ilDB, $query, and $res.

Referenced by updateParticipation().

{
global $ilDB;
$query = "SELECT * FROM event_participants ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ".
"AND usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->query($query);
if($res->numRows())
{
$query = "UPDATE event_participants ".
"SET participated = ".$ilDB->quote($a_status ,'integer')." ".
"WHERE event_id = ".$ilDB->quote($a_event_id ,'integer')." ".
"AND usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->manipulate($query);
}
else
{
$query = "INSERT INTO event_participants (registered,participated,event_id,usr_id) ".
"VALUES( ".
$ilDB->quote(0 ,'integer').", ".
$ilDB->quote($a_status ,'integer').", ".
$ilDB->quote($a_event_id ,'integer').", ".
$ilDB->quote($a_usr_id ,'integer')." ".
")";
$res = $ilDB->manipulate($query);
}
return true;
}

+ Here is the caller graph for this function:

ilEventParticipants::getComment ( )

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

References $comment.

Referenced by updateUser().

{
}

+ Here is the caller graph for this function:

ilEventParticipants::getEventId ( )

Definition at line 315 of file class.ilEventParticipants.php.

References $event_id.

Referenced by __read(), register(), unregister(), updateParticipation(), and updateUser().

{
}

+ Here is the caller graph for this function:

ilEventParticipants::getMark ( )

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

Referenced by updateUser().

{
return $this->mark;
}

+ Here is the caller graph for this function:

ilEventParticipants::getParticipants ( )

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

{
return $this->participants ? $this->participants : array();
}
ilEventParticipants::getParticipated ( )

Definition at line 82 of file class.ilEventParticipants.php.

Referenced by updateUser().

{
return $this->participated;
}

+ Here is the caller graph for this function:

ilEventParticipants::getRegistered ( )

Definition at line 90 of file class.ilEventParticipants.php.

Referenced by updateUser().

{
return $this->registered;
}

+ Here is the caller graph for this function:

ilEventParticipants::getUser (   $a_usr_id)

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

{
return $this->participants[$a_usr_id] ? $this->participants[$a_usr_id] : array();
}
ilEventParticipants::getUserId ( )

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

Referenced by updateUser().

{
return $this->user_id;
}

+ Here is the caller graph for this function:

ilEventParticipants::hasParticipated (   $a_usr_id)

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

{
return $this->participants[$a_usr_id]['participated'] ? true : false;
}
ilEventParticipants::ilEventParticipants (   $a_event_id)

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

References $ilDB, $ilErr, $lng, $tree, and __read().

{
$this->ilErr =& $ilErr;
$this->db =& $ilDB;
$this->lng =& $lng;
$this->event_id = $a_event_id;
$this->__read();
}

+ Here is the call graph for this function:

ilEventParticipants::isRegistered (   $a_usr_id)

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

{
return $this->participants[$a_usr_id]['registered'] ? true : false;
}
ilEventParticipants::register (   $a_usr_id)

Definition at line 245 of file class.ilEventParticipants.php.

References _register(), and getEventId().

{
return ilEventParticipants::_register($a_usr_id,$this->getEventId());
}

+ Here is the call graph for this function:

ilEventParticipants::setComment (   $a_comment)

Definition at line 70 of file class.ilEventParticipants.php.

{
$this->comment = $a_comment;
}
ilEventParticipants::setEventId (   $a_event_id)

Definition at line 319 of file class.ilEventParticipants.php.

{
$this->event_id = $a_event_id;
}
ilEventParticipants::setMark (   $a_mark)

Definition at line 62 of file class.ilEventParticipants.php.

{
$this->mark = $a_mark;
}
ilEventParticipants::setParticipated (   $a_status)

Definition at line 78 of file class.ilEventParticipants.php.

{
$this->participated = $a_status;
}
ilEventParticipants::setRegistered (   $a_status)

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

{
$this->registered = $a_status;
}
ilEventParticipants::setUserId (   $a_usr_id)

Definition at line 54 of file class.ilEventParticipants.php.

Referenced by ilObjSessionGUI\updateMembersObject().

{
$this->user_id = $a_usr_id;
}

+ Here is the caller graph for this function:

ilEventParticipants::unregister (   $a_usr_id)

Definition at line 279 of file class.ilEventParticipants.php.

References _unregister(), and getEventId().

{
return ilEventParticipants::_unregister($a_usr_id,$this->getEventId());
}

+ Here is the call graph for this function:

ilEventParticipants::updateParticipation (   $a_usr_id,
  $a_status 
)

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

References _updateParticipation(), and getEventId().

{
}

+ Here is the call graph for this function:

ilEventParticipants::updateUser ( )

Definition at line 94 of file class.ilEventParticipants.php.

References $ilDB, $query, $res, getComment(), getEventId(), getMark(), getParticipated(), getRegistered(), and getUserId().

{
global $ilDB;
$query = "DELETE FROM event_participants ".
"WHERE event_id = ".$ilDB->quote($this->getEventId() ,'integer')." ".
"AND usr_id = ".$ilDB->quote($this->getUserId() ,'integer')." ";
$res = $ilDB->manipulate($query);
$query = "INSERT INTO event_participants (event_id,usr_id,registered,participated,mark,e_comment) ".
"VALUES( ".
$ilDB->quote($this->getEventId() ,'integer').", ".
$ilDB->quote($this->getUserId() ,'integer').", ".
$ilDB->quote($this->getRegistered() ,'integer').", ".
$ilDB->quote($this->getParticipated() ,'integer').", ".
$ilDB->quote($this->getMark() ,'text').", ".
$ilDB->quote($this->getComment() ,'text')." ".
")";
$res = $ilDB->manipulate($query);
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilEventParticipants::$event_id = null

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

Referenced by getEventId().

ilEventParticipants::$ilErr

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

Referenced by ilEventParticipants().

ilEventParticipants::$lng

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

Referenced by ilEventParticipants().

ilEventParticipants::$tree

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

Referenced by ilEventParticipants().


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