Definition at line 38 of file class.ilEvent.php.
ilEvent::__read | ( | ) |
Definition at line 379 of file class.ilEvent.php.
References $query, $res, $row, ilEventAppointment::_readAppointmentsByEvent(), enableParticipation(), enableRegistration(), readFiles(), setDescription(), setDetails(), setEmail(), setLocation(), setName(), setObjId(), setPhone(), and setTitle().
Referenced by ilEvent().
{ if(!$this->event_id) { return true; } // read event data $query = "SELECT * FROM event WHERE event_id = '".$this->event_id."'"; $res = $this->db->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $this->setObjId($row->obj_id); $this->setTitle($row->title); $this->setDescription($row->description); $this->setLocation($row->location); #$this->setPTitle($row->tutor_title); #$this->setFirstname($row->tutor_firstname); $this->setName($row->tutor_name); $this->setPhone($row->tutor_phone); $this->setEmail($row->tutor_email); $this->setDetails($row->details); $this->enableRegistration($row->registration); $this->enableParticipation($row->participation); } // get assigned appointments $this->appointments =& ilEventAppointment::_readAppointmentsByEvent($this->event_id); // get assigned files $this->readFiles(); return true; }
ilEvent::_delete | ( | $ | a_event_id | ) |
Definition at line 288 of file class.ilEvent.php.
References $ilDB, $query, ilEventParticipants::_deleteByEvent(), ilEventFile::_deleteByEvent(), and ilEventAppointment::_deleteByEvent().
Referenced by _deleteAll(), ilEventAdministrationGUI::delete(), and delete().
{ global $ilDB; $query = "DELETE FROM event WHERE event_id = '".$a_event_id."'"; $ilDB->query($query); ilEventAppointment::_deleteByEvent($a_event_id); ilEventFile::_deleteByEvent($a_event_id); include_once 'course/classes/Event/class.ilEventItems.php'; ilEventItems::_delete($a_event_id); include_once 'course/classes/Event/class.ilEventParticipants.php'; ilEventParticipants::_deleteByEvent($a_event_id); return true; }
ilEvent::_deleteAll | ( | $ | a_obj_id | ) |
Definition at line 307 of file class.ilEvent.php.
References $ilDB, $query, $res, $row, and _delete().
Referenced by ilObjCourse::delete().
{ global $ilDB; $query = "SELECT * FROM event ". "WHERE obj_id = '".$a_obj_id."'"; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { ilEvent::_delete($row->event_id); } return true; }
ilEvent::_exists | ( | $ | a_event_id | ) |
Definition at line 321 of file class.ilEvent.php.
References $ilDB, $query, and $res.
Referenced by ilLPEventCollections::__read(), and ilLPEventCollections::_getItems().
{ global $ilDB; $query = "SELECT * FROM event WHERE event_id = '".$a_event_id."'"; $res = $ilDB->query($query); return $res->numRows() ? true : false; }
& ilEvent::_getEvents | ( | $ | a_obj_id | ) |
Definition at line 343 of file class.ilEvent.php.
References $ilDB, $query, $res, $row, and ilEvent().
Referenced by ilLPListOfSettingsGUI::__showCollectionTable(), ilCourseContentGUI::__showEvents(), ilCourseObjectivePresentationGUI::__showSessions(), and _getEventsAsArray().
{ global $ilDB; $query = "SELECT * FROM event ". "JOIN event_appointment ON event.event_id = event_appointment.event_id ". "WHERE event.obj_id = '".$a_obj_id."' ". "ORDER BY starting_time"; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $events[] =& new ilEvent($row->event_id); } return $events ? $events : array(); }
& ilEvent::_getEventsAsArray | ( | $ | a_obj_id | ) |
Definition at line 360 of file class.ilEvent.php.
References _getEvents().
Referenced by ilCourseContentGUI::__editAdvancedUserTimings(), and ilCourseContentGUI::__editUserTimings().
{ foreach(ilEvent::_getEvents($a_obj_id) as $event_obj) { $item[$event_obj->getEventId()]['title'] = $event_obj->getTitle(); $item[$event_obj->getEventId()]['description'] = $event_obj->getDescription(); $item[$event_obj->getEventId()]['type'] = 'event'; $item[$event_obj->getEventId()]['event_id'] = $event_obj->getEventId(); $event_appointment =& $event_obj->getFirstAppointment(); $item[$event_obj->getEventId()]['start'] = $event_appointment->getStartingTime(); $item[$event_obj->getEventId()]['end'] = $event_appointment->getEndingTime(); $item[$event_obj->getEventId()]['fulltime'] = $event_appointment->enabledFullTime(); } return $item ? $item : array(); }
ilEvent::_lookupCourseId | ( | ) |
ilEvent::addAppointment | ( | &$ | appointment | ) |
Definition at line 183 of file class.ilEvent.php.
{ $this->appointments[] =& $appointment; }
ilEvent::create | ( | ) |
Definition at line 211 of file class.ilEvent.php.
References $query, enabledParticipation(), enabledRegistration(), getDescription(), getDetails(), getEmail(), getEventId(), getLocation(), getName(), getPhone(), getTitle(), and setEventId().
{ $query = "INSERT INTO event SET ". "obj_id = '".$this->getObjId()."', ". "title = '".ilUtil::prepareDBString($this->getTitle())."', ". "description = '".ilUtil::prepareDBString($this->getDescription())."', ". "location = '".ilUtil::prepareDBString($this->getLocation())."',". #"tutor_firstname = '".ilUtil::prepareDBString($this->getFirstname())."', ". #"tutor_lastname = '".ilUtil::prepareDBString($this->getLastname())."', ". "tutor_name = '".ilUtil::prepareDBString($this->getName())."', ". #"tutor_title = '".ilUtil::prepareDBString($this->getPTitle())."', ". "tutor_phone = '".ilUtil::prepareDBString($this->getPhone())."', ". "tutor_email = '".ilUtil::prepareDBString($this->getEmail())."', ". "details = '".ilUtil::prepareDBString($this->getDetails())."',". "registration = '".(int) $this->enabledRegistration()."', ". "participation = '".(int) $this->enabledParticipation()."'"; $this->db->query($query); $this->setEventId($this->db->getLastInsertId()); return $this->getEventId(); }
ilEvent::delete | ( | ) |
Definition at line 259 of file class.ilEvent.php.
References _delete(), and getEventId().
{ ilEvent::_delete($this->getEventId()); return true; }
ilEvent::enabledParticipation | ( | ) |
Definition at line 168 of file class.ilEvent.php.
Referenced by create(), and update().
{ return true; return (bool) $this->participation; }
ilEvent::enabledRegistration | ( | ) |
Definition at line 160 of file class.ilEvent.php.
Referenced by create(), and update().
{ return (bool) $this->registration; }
ilEvent::enableParticipation | ( | $ | a_status | ) |
Definition at line 173 of file class.ilEvent.php.
Referenced by __read().
{ $this->participation = $a_status; }
ilEvent::enableRegistration | ( | $ | a_status | ) |
Definition at line 164 of file class.ilEvent.php.
Referenced by __read().
{ $this->registration = $a_status; }
& ilEvent::getAppointments | ( | ) |
Definition at line 179 of file class.ilEvent.php.
{
return $this->appointments ? $this->appointments : array();
}
ilEvent::getDescription | ( | ) |
Definition at line 86 of file class.ilEvent.php.
Referenced by create(), and update().
{
return $this->description;
}
ilEvent::getDetails | ( | ) |
Definition at line 156 of file class.ilEvent.php.
Referenced by create(), and update().
{
return $this->details;
}
ilEvent::getEmail | ( | ) |
Definition at line 136 of file class.ilEvent.php.
Referenced by create(), hasTutorSettings(), and update().
{
return $this->mail;
}
ilEvent::getEventId | ( | ) |
Definition at line 70 of file class.ilEvent.php.
Referenced by create(), delete(), and readFiles().
{
return $this->event_id;
}
ilEvent::getFiles | ( | ) |
Definition at line 206 of file class.ilEvent.php.
{
return $this->files ? $this->files : array();
}
& ilEvent::getFirstAppointment | ( | ) |
Definition at line 191 of file class.ilEvent.php.
{ return is_object($this->appointments[0]) ? $this->appointments[0] : ($this->appointments[0] =& new ilEventAppointment()); }
ilEvent::getFirstname | ( | ) |
Definition at line 112 of file class.ilEvent.php.
Referenced by getFullname().
{
return $this->firstname;
}
ilEvent::getFullname | ( | ) |
Definition at line 277 of file class.ilEvent.php.
References getFirstname(), getLastname(), getName(), and getPTitle().
Referenced by hasTutorSettings().
{ return $this->getName(); if(strlen($this->getPTitle()) or strlen($this->getFirstname()) or strlen($this->getLastname())) { return $this->getPTitle().' '.$this->getFirstname().' '.$this->getLastname(); } return ''; }
ilEvent::getLastname | ( | ) |
Definition at line 120 of file class.ilEvent.php.
Referenced by getFullname().
{
return $this->lastname;
}
ilEvent::getLocation | ( | ) |
Definition at line 95 of file class.ilEvent.php.
Referenced by create(), and update().
{
return $this->location;
}
ilEvent::getName | ( | ) |
Definition at line 107 of file class.ilEvent.php.
Referenced by create(), getFullname(), and update().
{
return $this->name;
}
ilEvent::getObjId | ( | ) |
Definition at line 65 of file class.ilEvent.php.
{
return $this->obj_id;
}
ilEvent::getPhone | ( | ) |
Definition at line 144 of file class.ilEvent.php.
Referenced by create(), hasTutorSettings(), and update().
{
return $this->phone;
}
ilEvent::getPTitle | ( | ) |
Definition at line 128 of file class.ilEvent.php.
Referenced by getFullname().
{
return $this->ptitle;
}
ilEvent::getTitle | ( | ) |
Definition at line 78 of file class.ilEvent.php.
Referenced by create(), update(), and validate().
{
return $this->title;
}
ilEvent::hasTutorSettings | ( | ) |
Definition at line 270 of file class.ilEvent.php.
References getEmail(), getFullname(), and getPhone().
{ return strlen($this->getFullname()) or strlen($this->getEmail()) or strlen($this->getPhone()); }
ilEvent::ilEvent | ( | $ | a_event_id | ) |
Definition at line 49 of file class.ilEvent.php.
References $ilDB, $ilErr, $lng, $tree, and __read().
Referenced by _getEvents().
{ global $ilErr,$ilDB,$lng,$tree; $this->ilErr =& $ilErr; $this->db =& $ilDB; $this->lng =& $lng; $this->event_id = $a_event_id; $this->__read(); }
ilEvent::readFiles | ( | ) |
Definition at line 265 of file class.ilEvent.php.
References ilEventFile::_readFilesByEvent(), and getEventId().
Referenced by __read().
{ $this->files = ilEventFile::_readFilesByEvent($this->getEventId()); }
ilEvent::setAppointments | ( | &$ | appointments | ) |
Definition at line 187 of file class.ilEvent.php.
References $appointments.
{ $this->appointments =& $appointments; }
ilEvent::setDescription | ( | $ | a_description | ) |
Definition at line 90 of file class.ilEvent.php.
Referenced by __read().
{ $this->description = $a_description; }
ilEvent::setDetails | ( | $ | a_details | ) |
Definition at line 152 of file class.ilEvent.php.
Referenced by __read().
{ $this->details = $a_details; }
ilEvent::setEmail | ( | $ | a_mail | ) |
Definition at line 140 of file class.ilEvent.php.
Referenced by __read().
{ $this->mail = $a_mail; }
ilEvent::setEventId | ( | $ | a_event_id | ) |
Definition at line 74 of file class.ilEvent.php.
Referenced by create().
{ $this->event_id = $a_event_id; }
ilEvent::setFirstname | ( | $ | a_firstname | ) |
Definition at line 116 of file class.ilEvent.php.
{ $this->firstname = $a_firstname; }
ilEvent::setLastname | ( | $ | a_lastname | ) |
Definition at line 124 of file class.ilEvent.php.
{ $this->lastname = $a_lastname; }
ilEvent::setLocation | ( | $ | a_location | ) |
Definition at line 99 of file class.ilEvent.php.
Referenced by __read().
{ $this->location = $a_location; }
ilEvent::setName | ( | $ | a_name | ) |
Definition at line 103 of file class.ilEvent.php.
Referenced by __read().
{ $this->name = $a_name; }
ilEvent::setObjId | ( | $ | a_obj_id | ) |
Definition at line 61 of file class.ilEvent.php.
Referenced by __read().
{ $this->obj_id = $a_obj_id; }
ilEvent::setPhone | ( | $ | a_phone | ) |
Definition at line 148 of file class.ilEvent.php.
Referenced by __read().
{ $this->phone = $a_phone; }
ilEvent::setPTitle | ( | $ | a_ptitle | ) |
Definition at line 132 of file class.ilEvent.php.
{ $this->ptitle = $a_ptitle; }
ilEvent::setTitle | ( | $ | a_title | ) |
Definition at line 82 of file class.ilEvent.php.
Referenced by __read().
{ $this->title = $a_title; }
ilEvent::update | ( | ) |
Definition at line 234 of file class.ilEvent.php.
References $query, enabledParticipation(), enabledRegistration(), getDescription(), getDetails(), getEmail(), getLocation(), getName(), getPhone(), and getTitle().
{ if(!$this->event_id) { return false; } $query = "UPDATE event SET ". "title = '".ilUtil::prepareDBString($this->getTitle())."', ". "description = '".ilUtil::prepareDBString($this->getDescription())."', ". "location = '".ilUtil::prepareDBString($this->getLocation())."',". #"tutor_firstname = '".ilUtil::prepareDBString($this->getFirstname())."', ". "tutor_name = '".ilUtil::prepareDBString($this->getName())."', ". #"tutor_title = '".ilUtil::prepareDBString($this->getPTitle())."', ". "tutor_phone = '".ilUtil::prepareDBString($this->getPhone())."', ". "tutor_email = '".ilUtil::prepareDBString($this->getEmail())."', ". "details = '".ilUtil::prepareDBString($this->getDetails())."', ". "registration = '".(int) $this->enabledRegistration()."', ". "participation = '".(int) $this->enabledParticipation()."' ". "WHERE event_id = '".$this->getEventId()."'"; $this->db->query($query); return true; }
ilEvent::validate | ( | ) |
Definition at line 196 of file class.ilEvent.php.
References getTitle().
{ if(!strlen($this->getTitle())) { $this->ilErr->appendMessage($this->lng->txt('fill_out_all_required_fields')); return false; } return true; }
ilEvent::$appointments = array() |
Definition at line 46 of file class.ilEvent.php.
Referenced by setAppointments().
ilEvent::$event_id = null |
Definition at line 45 of file class.ilEvent.php.
ilEvent::$ilDB |
Definition at line 41 of file class.ilEvent.php.
Referenced by _delete(), _deleteAll(), _exists(), _getEvents(), _lookupCourseId(), and ilEvent().
ilEvent::$ilErr |
Definition at line 40 of file class.ilEvent.php.
Referenced by ilEvent().
ilEvent::$lng |
Definition at line 43 of file class.ilEvent.php.
Referenced by ilEvent().
ilEvent::$tree |
Definition at line 42 of file class.ilEvent.php.
Referenced by ilEvent().