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) | |
_isRegistered ($a_usr_id, $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 () | |
Data Fields | |
$ilErr | |
$ilDB | |
$tree | |
$lng | |
$event_id = null |
Definition at line 35 of file class.ilEventParticipants.php.
ilEventParticipants::__read | ( | ) |
Definition at line 337 of file class.ilEventParticipants.php.
References $query, $res, and $row.
Referenced by ilEventParticipants().
{ $query = "SELECT * FROM event_participants ". "WHERE event_id = '".$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->comment; } }
ilEventParticipants::_deleteByEvent | ( | $ | a_event_id | ) |
Definition at line 316 of file class.ilEventParticipants.php.
Referenced by ilEvent::_delete().
{ global $ilDB; $query = "DELETE FROM event_participants ". "WHERE event_id = '".$a_event_id."'"; $ilDB->query($query); return true; }
ilEventParticipants::_deleteByUser | ( | $ | a_usr_id | ) |
Definition at line 325 of file class.ilEventParticipants.php.
Referenced by ilObjUser::delete().
{ global $ilDB; $query = "DELETE FROM event_participants ". "WHERE usr_id = '".$a_usr_id."'"; $ilDB->query($query); return true; }
ilEventParticipants::_getParticipated | ( | $ | a_event_id | ) |
Definition at line 182 of file class.ilEventParticipants.php.
References $ilDB, $query, $res, and $row.
Referenced by ilLPStatusEvent::_getStatusInfo().
{ global $ilDB; $query = "SELECT * FROM event_participants ". "WHERE event_id = '".$a_event_id."' ". "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(); }
ilEventParticipants::_getRegistered | ( | $ | a_event_id | ) |
Definition at line 167 of file class.ilEventParticipants.php.
References $ilDB, $query, $res, and $row.
Referenced by ilLPStatusEvent::_getStatusInfo().
{ global $ilDB; $query = "SELECT * FROM event_participants ". "WHERE event_id = '".$a_event_id."' ". "AND registered = '1'"; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $user_ids[] = $row->usr_id; } return $user_ids ? $user_ids : array(); }
ilEventParticipants::_isRegistered | ( | $ | a_usr_id, | |
$ | a_event_id | |||
) |
Definition at line 197 of file class.ilEventParticipants.php.
References $ilDB, $query, $res, and $row.
Referenced by ilCourseContentGUI::__showEvents(), ilCourseObjectivePresentationGUI::__showSessions(), and ilEventAdministrationGUI::updateMembers().
{ global $ilDB; $query = "SELECT * FROM event_participants ". "WHERE event_id = '".$a_event_id."' ". "AND usr_id = '".$a_usr_id."'"; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { return (bool) $row->registered; } return false; }
ilEventParticipants::_lookupComment | ( | $ | a_event_id, | |
$ | a_usr_id | |||
) |
Definition at line 291 of file class.ilEventParticipants.php.
References $ilDB, $query, $res, and $row.
Referenced by ilLPEventListGUI::__readComment().
{ global $ilDB; $query = "SELECT * FROM event_participants ". "WHERE event_id = '".$a_event_id."' ". "AND usr_id = '".$a_usr_id."'"; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { return $row->comment; } return ''; }
ilEventParticipants::_lookupMark | ( | $ | a_event_id, | |
$ | a_usr_id | |||
) |
Definition at line 276 of file class.ilEventParticipants.php.
References $ilDB, $query, $res, and $row.
Referenced by ilLPEventListGUI::__readMark().
{ global $ilDB; $query = "SELECT * FROM event_participants ". "WHERE event_id = '".$a_event_id."' ". "AND usr_id = '".$a_usr_id."'"; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { return $row->mark; } return ''; }
ilEventParticipants::_register | ( | $ | a_usr_id, | |
$ | a_event_id | |||
) |
Definition at line 212 of file class.ilEventParticipants.php.
References $ilDB, $query, and $res.
Referenced by register(), and ilEventAdministrationGUI::register().
{ global $ilDB; $query = "SELECT * FROM event_participants ". "WHERE event_id = '".$a_event_id."' ". "AND usr_id = '".$a_usr_id."'"; $res = $ilDB->query($query); if($res->numRows()) { $query = "UPDATE event_participants ". "SET registered = '1' ". "WHERE event_id = '".$a_event_id."' ". "AND usr_id = '".$a_usr_id."'"; $ilDB->query($query); } else { $query = "INSERT INTO event_participants ". "SET registered = '1', ". "participated = '0', ". "event_id = '".$a_event_id."', ". "usr_id = '".$a_usr_id."'"; $ilDB->query($query); } return true; }
ilEventParticipants::_unregister | ( | $ | a_usr_id, | |
$ | a_event_id | |||
) |
Definition at line 244 of file class.ilEventParticipants.php.
References $ilDB, $query, and $res.
Referenced by unregister(), and ilEventAdministrationGUI::unregister().
{ global $ilDB; $query = "SELECT * FROM event_participants ". "WHERE event_id = '".$a_event_id."' ". "AND usr_id = '".$a_usr_id."'"; $res = $ilDB->query($query); if($res->numRows()) { $query = "UPDATE event_participants ". "SET registered = '0' ". "WHERE event_id = '".$a_event_id."' ". "AND usr_id = '".$a_usr_id."'"; $ilDB->query($query); } else { $query = "INSERT INTO event_participants ". "SET registered = '0', ". "participated = '0' ". "event_id = '".$a_event_id."', ". "usr_id = '".$a_usr_id."'"; $ilDB->query($query); } return true; }
ilEventParticipants::_updateParticipation | ( | $ | a_usr_id, | |
$ | a_event_id, | |||
$ | a_status | |||
) |
Definition at line 139 of file class.ilEventParticipants.php.
References $ilDB, $query, and $res.
Referenced by updateParticipation().
{ global $ilDB; $query = "SELECT * FROM event_participants ". "WHERE event_id = '".$a_event_id."' ". "AND usr_id = '".$a_usr_id."'"; $res = $ilDB->query($query); if($res->numRows()) { $query = "UPDATE event_participants ". "SET participated = '".(int) $a_status."' ". "WHERE event_id = '".$a_event_id."' ". "AND usr_id = '".$a_usr_id."'"; $ilDB->query($query); } else { $query = "INSERT INTO event_participants ". "SET registered = '0', ". "participated = '".(int) $a_status."', ". "event_id = '".$a_event_id."', ". "usr_id = '".$a_usr_id."'"; $ilDB->query($query); } return true; }
ilEventParticipants::getComment | ( | ) |
Definition at line 76 of file class.ilEventParticipants.php.
Referenced by updateUser().
{
return $this->comment;
}
ilEventParticipants::getEventId | ( | ) |
Definition at line 307 of file class.ilEventParticipants.php.
Referenced by register(), unregister(), and updateParticipation().
{
return $this->event_id;
}
ilEventParticipants::getMark | ( | ) |
Definition at line 68 of file class.ilEventParticipants.php.
Referenced by updateUser().
{
return $this->mark;
}
ilEventParticipants::getParticipants | ( | ) |
Definition at line 119 of file class.ilEventParticipants.php.
{
return $this->participants ? $this->participants : array();
}
ilEventParticipants::getParticipated | ( | ) |
Definition at line 84 of file class.ilEventParticipants.php.
Referenced by updateUser().
{
return $this->participated;
}
ilEventParticipants::getRegistered | ( | ) |
Definition at line 92 of file class.ilEventParticipants.php.
Referenced by updateUser().
{
return $this->registered;
}
ilEventParticipants::getUser | ( | $ | a_usr_id | ) |
Definition at line 114 of file class.ilEventParticipants.php.
{
return $this->participants[$a_usr_id] ? $this->participants[$a_usr_id] : array();
}
ilEventParticipants::getUserId | ( | ) |
Definition at line 60 of file class.ilEventParticipants.php.
{
return $this->user_id;
}
ilEventParticipants::hasParticipated | ( | $ | a_usr_id | ) |
Definition at line 129 of file class.ilEventParticipants.php.
{ return $this->participants[$a_usr_id]['participated'] ? true : false; }
ilEventParticipants::ilEventParticipants | ( | $ | a_event_id | ) |
Definition at line 44 of file class.ilEventParticipants.php.
References $ilDB, $ilErr, $lng, $tree, and __read().
{ global $ilErr,$ilDB,$lng,$tree; $this->ilErr =& $ilErr; $this->db =& $ilDB; $this->lng =& $lng; $this->event_id = $a_event_id; $this->__read(); }
ilEventParticipants::isRegistered | ( | $ | a_usr_id | ) |
Definition at line 124 of file class.ilEventParticipants.php.
{ return $this->participants[$a_usr_id]['registered'] ? true : false; }
ilEventParticipants::register | ( | $ | a_usr_id | ) |
Definition at line 239 of file class.ilEventParticipants.php.
References _register(), and getEventId().
{ return ilEventParticipants::_register($a_usr_id,$this->getEventId()); }
ilEventParticipants::setComment | ( | $ | a_comment | ) |
Definition at line 72 of file class.ilEventParticipants.php.
{ $this->comment = $a_comment; }
ilEventParticipants::setEventId | ( | $ | a_event_id | ) |
Definition at line 311 of file class.ilEventParticipants.php.
{ $this->event_id = $a_event_id; }
ilEventParticipants::setMark | ( | $ | a_mark | ) |
Definition at line 64 of file class.ilEventParticipants.php.
{ $this->mark = $a_mark; }
ilEventParticipants::setParticipated | ( | $ | a_status | ) |
Definition at line 80 of file class.ilEventParticipants.php.
{ $this->participated = $a_status; }
ilEventParticipants::setRegistered | ( | $ | a_status | ) |
Definition at line 88 of file class.ilEventParticipants.php.
{ $this->registered = $a_status; }
ilEventParticipants::setUserId | ( | $ | a_usr_id | ) |
Definition at line 56 of file class.ilEventParticipants.php.
{ $this->user_id = $a_usr_id; }
ilEventParticipants::unregister | ( | $ | a_usr_id | ) |
Definition at line 271 of file class.ilEventParticipants.php.
References _unregister(), and getEventId().
{ return ilEventParticipants::_unregister($a_usr_id,$this->getEventId()); }
ilEventParticipants::updateParticipation | ( | $ | a_usr_id, | |
$ | a_status | |||
) |
Definition at line 134 of file class.ilEventParticipants.php.
References _updateParticipation(), and getEventId().
{ ilEventParticipants::_updateParticipation($a_usr_id,$this->getEventId(),$a_status); }
ilEventParticipants::updateUser | ( | ) |
Definition at line 96 of file class.ilEventParticipants.php.
References $query, getComment(), getMark(), getParticipated(), and getRegistered().
{ $query = "DELETE FROM event_participants ". "WHERE event_id = '".$this->getEventId()."' ". "AND usr_id = '".$this->getUserId()."'"; $this->db->query($query); $query = "INSERT INTO event_participants ". "SET event_id = '".$this->getEventId()."', ". "usr_id = '".$this->getUserId()."', ". "registered = '".(int) $this->getRegistered()."', ". "participated = '".(int) $this->getParticipated()."', ". "mark = '".ilUtil::prepareDBString($this->getMark())."', ". "comment = '".ilUtil::prepareDBString($this->getComment())."'"; $this->db->query($query); return true; }
ilEventParticipants::$event_id = null |
Definition at line 42 of file class.ilEventParticipants.php.
ilEventParticipants::$ilDB |
Definition at line 38 of file class.ilEventParticipants.php.
Referenced by _deleteByEvent(), _deleteByUser(), _getParticipated(), _getRegistered(), _isRegistered(), _lookupComment(), _lookupMark(), _register(), _unregister(), _updateParticipation(), and ilEventParticipants().
ilEventParticipants::$ilErr |
Definition at line 37 of file class.ilEventParticipants.php.
Referenced by ilEventParticipants().
ilEventParticipants::$lng |
Definition at line 40 of file class.ilEventParticipants.php.
Referenced by ilEventParticipants().
ilEventParticipants::$tree |
Definition at line 39 of file class.ilEventParticipants.php.
Referenced by ilEventParticipants().