ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilSessionAppointment Class Reference

class ilSessionAppointment More...

+ Inheritance diagram for ilSessionAppointment:
+ Collaboration diagram for ilSessionAppointment:

Public Member Functions

 __construct (int $a_appointment_id=0)
 
 isFullday ()
 is event a fullday period More...
 
 getStart ()
 Get start of date period. More...
 
 setStart (ilDateTime $a_start)
 
 getEnd ()
 Get end of period. More...
 
 setEnd (ilDateTime $a_end)
 
 setAppointmentId (int $a_appointment_id)
 
 getAppointmentId ()
 
 setSessionId (int $a_session_id)
 
 getSessionId ()
 
 setStartingTime (int $a_starting_time)
 
 getStartingTime ()
 
 setEndingTime (int $a_ending_time)
 
 getEndingTime ()
 
 toggleFullTime (bool $a_status)
 
 enabledFullTime ()
 
 formatTime ()
 
 timeToString (int $start, int $end)
 
 appointmentToString ()
 
 cloneObject (int $new_id)
 
 create ()
 
 update ()
 
 delete ()
 
 validate ()
 

Static Public Member Functions

static _lookupAppointment (int $a_obj_id)
 
static lookupNextSessionByCourse (int $a_ref_id)
 
static lookupLastSessionByCourse (int $a_ref_id)
 
static _appointmentToString (int $start, int $end, bool $fulltime)
 
static _delete (int $a_appointment_id)
 
static _deleteBySession (int $a_event_id)
 
static _readAppointmentsBySession (int $a_event_id)
 

Protected Member Functions

 __read ()
 

Protected Attributes

ilErrorHandling $ilErr
 
ilDBInterface $db
 
ilTree $tree
 
ilLanguage $lng
 
ilDateTime $start = null
 
ilDateTime $end = null
 
int $starting_time = 0
 
int $ending_time = 0
 
bool $fulltime = false
 
int $appointment_id = 0
 
int $session_id = 0
 

Detailed Description

class ilSessionAppointment

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

\

Definition at line 29 of file class.ilSessionAppointment.php.

Constructor & Destructor Documentation

◆ __construct()

ilSessionAppointment::__construct ( int  $a_appointment_id = 0)

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

References $DIC, __read(), and ILIAS\Repository\lng().

44  {
45  global $DIC;
46 
47  $this->ilErr = $DIC['ilErr'];
48  $this->db = $DIC->database();
49  $this->tree = $DIC->repositoryTree();
50  $this->lng = $DIC->language();
51 
52  $this->appointment_id = $a_appointment_id;
53  $this->__read();
54  }
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Member Function Documentation

◆ __read()

ilSessionAppointment::__read ( )
protected

Definition at line 387 of file class.ilSessionAppointment.php.

References $db, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, getAppointmentId(), IL_CAL_DATETIME, ILIAS\Repository\int(), isFullday(), null, setSessionId(), and toggleFullTime().

Referenced by __construct().

387  : ?bool
388  {
389  $ilDB = $this->db;
390 
391  if (!$this->getAppointmentId()) {
392  return null;
393  }
394 
395  $query = "SELECT * FROM event_appointment " .
396  "WHERE appointment_id = " . $ilDB->quote($this->getAppointmentId(), 'integer') . " ";
397  $res = $this->db->query($query);
398  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
399  $this->setSessionId((int) $row->event_id);
400  $this->toggleFullTime((bool) $row->fulltime);
401 
402  if ($this->isFullday()) {
403  $this->start = new ilDate($row->e_start, IL_CAL_DATETIME);
404  $this->end = new ilDate($row->e_end, IL_CAL_DATETIME);
405  } else {
406  $this->start = new ilDateTime($row->e_start, IL_CAL_DATETIME, 'UTC');
407  $this->end = new ilDateTime($row->e_end, IL_CAL_DATETIME, 'UTC');
408  }
409  $this->starting_time = (int) $this->start->getUnixTime();
410  $this->ending_time = (int) $this->end->getUnixTime();
411  }
412  return true;
413  }
$res
Definition: ltiservices.php:66
const IL_CAL_DATETIME
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
isFullday()
is event a fullday period
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _appointmentToString()

static ilSessionAppointment::_appointmentToString ( int  $start,
int  $end,
bool  $fulltime 
)
static

Definition at line 252 of file class.ilSessionAppointment.php.

References $DIC, ilDatePresentation\formatPeriod(), IL_CAL_UNIX, and ilLanguage\txt().

Referenced by ilCourseContentGUI\__renderUserItem(), ilRepositoryExplorerGUI\getNodeContent(), ilObjSessionListGUI\getTitle(), ilObjectCopySelectionTableGUI\parseSource(), ilTimingsPersonalTableGUI\parseTitle(), ilTimingsManageTableGUI\parseTitle(), and ilSessionMailTemplateParticipantContext\resolveSpecificPlaceholder().

252  : string
253  {
254  global $DIC;
255 
256  $lng = $DIC->language();
257 
258  if ($fulltime) {
260  new ilDate($start, IL_CAL_UNIX),
261  #new ilDate($end,IL_CAL_UNIX)).' ('.$lng->txt('event_full_time_info').')';
262  new ilDate($end, IL_CAL_UNIX)
263  );
264  } else {
268  );
269  }
270  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
const IL_CAL_UNIX
global $DIC
Definition: shib_login.php:26
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _delete()

static ilSessionAppointment::_delete ( int  $a_appointment_id)
static

Definition at line 334 of file class.ilSessionAppointment.php.

References $DIC, $ilDB, and $res.

334  : bool
335  {
336  global $DIC;
337 
338  $ilDB = $DIC->database();
339 
340  $query = "DELETE FROM event_appointment " .
341  "WHERE appointment_id = " . $ilDB->quote($a_appointment_id, 'integer') . " ";
342  $res = $ilDB->manipulate($query);
343 
344  return true;
345  }
$res
Definition: ltiservices.php:66
global $DIC
Definition: shib_login.php:26

◆ _deleteBySession()

static ilSessionAppointment::_deleteBySession ( int  $a_event_id)
static

Definition at line 347 of file class.ilSessionAppointment.php.

References $DIC, $ilDB, and $res.

Referenced by ilObjSession\delete().

347  : bool
348  {
349  global $DIC;
350 
351  $ilDB = $DIC->database();
352 
353  $query = "DELETE FROM event_appointment " .
354  "WHERE event_id = " . $ilDB->quote($a_event_id, 'integer') . " ";
355  $res = $ilDB->manipulate($query);
356 
357  return true;
358  }
$res
Definition: ltiservices.php:66
global $DIC
Definition: shib_login.php:26
+ Here is the caller graph for this function:

◆ _lookupAppointment()

static ilSessionAppointment::_lookupAppointment ( int  $a_obj_id)
static

Definition at line 56 of file class.ilSessionAppointment.php.

References $DIC, $ilDB, $info, $res, ilDBConstants\FETCHMODE_OBJECT, and IL_CAL_DATETIME.

Referenced by ilCourseContentGUI\__renderUserItem(), ilLPStatusEvent\_getStatusInfo(), ilObjectActivation\addAdditionalSubItemInformation(), ilLPStatusEvent\determineStatus(), ilObjSessionListGUI\getAppointmentInfo(), ilRepositoryExplorerGUI\getNodeContent(), ilObjectCopySelectionTableGUI\parseSource(), ilTimingsPersonalTableGUI\parseTitle(), ilTimingsManageTableGUI\parseTitle(), ilSessionMailTemplateParticipantContext\resolveSpecificPlaceholder(), and ilRepositoryExplorerGUI\sortChilds().

56  : array
57  {
58  global $DIC;
59 
60  $ilDB = $DIC->database();
61 
62  $query = "SELECT * FROM event_appointment " .
63  "WHERE event_id = " . $ilDB->quote($a_obj_id, 'integer') . " ";
64  $res = $ilDB->query($query);
65  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
66  $info['fullday'] = $row->fulltime;
67 
68  $date = new ilDateTime($row->e_start, IL_CAL_DATETIME, 'UTC');
69  $info['start'] = $date->getUnixTime();
70  $date = new ilDateTime($row->e_end, IL_CAL_DATETIME, 'UTC');
71  $info['end'] = $date->getUnixTime();
72 
73  return $info;
74  }
75  return [];
76  }
$res
Definition: ltiservices.php:66
const IL_CAL_DATETIME
global $DIC
Definition: shib_login.php:26
$info
Definition: entry_point.php:21
+ Here is the caller graph for this function:

◆ _readAppointmentsBySession()

static ilSessionAppointment::_readAppointmentsBySession ( int  $a_event_id)
static

Definition at line 360 of file class.ilSessionAppointment.php.

References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilObjSession\initAppointments().

360  : array
361  {
362  global $DIC;
363 
364  $ilDB = $DIC->database();
365 
366  $query = "SELECT * FROM event_appointment " .
367  "WHERE event_id = " . $ilDB->quote($a_event_id, 'integer') . " " .
368  "ORDER BY starting_time";
369 
370  $res = $ilDB->query($query);
371  $appointments = [];
372  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
373  $appointments[] = new ilSessionAppointment((int) $row->appointment_id);
374  }
375  return $appointments;
376  }
$res
Definition: ltiservices.php:66
global $DIC
Definition: shib_login.php:26
class ilSessionAppointment
+ Here is the caller graph for this function:

◆ appointmentToString()

ilSessionAppointment::appointmentToString ( )

Definition at line 272 of file class.ilSessionAppointment.php.

References getEndingTime(), getStartingTime(), and isFullday().

272  : string
273  {
274  return self::_appointmentToString($this->getStartingTime(), $this->getEndingTime(), $this->isFullday());
275  }
isFullday()
is event a fullday period
+ Here is the call graph for this function:

◆ cloneObject()

ilSessionAppointment::cloneObject ( int  $new_id)

Definition at line 277 of file class.ilSessionAppointment.php.

References enabledFullTime(), getEndingTime(), and getStartingTime().

277  : self
278  {
279  $new_app = new ilSessionAppointment();
280  $new_app->setSessionId($new_id);
281  $new_app->setStartingTime($this->getStartingTime());
282  $new_app->setEndingTime($this->getEndingTime());
283  $new_app->toggleFullTime($this->enabledFullTime());
284  $new_app->create();
285 
286  return $new_app;
287  }
class ilSessionAppointment
+ Here is the call graph for this function:

◆ create()

ilSessionAppointment::create ( )

Definition at line 289 of file class.ilSessionAppointment.php.

References $db, $ilDB, $res, enabledFullTime(), getEnd(), getSessionId(), getStart(), and IL_CAL_DATETIME.

289  : bool
290  {
291  $ilDB = $this->db;
292 
293  if (!$this->getSessionId()) {
294  return false;
295  }
296  $next_id = $ilDB->nextId('event_appointment');
297  $query = "INSERT INTO event_appointment (appointment_id,event_id,e_start,e_end,fulltime) " .
298  "VALUES( " .
299  $ilDB->quote($next_id, 'integer') . ", " .
300  $ilDB->quote($this->getSessionId(), 'integer') . ", " .
301  $ilDB->quote($this->getStart()->get(IL_CAL_DATETIME, '', 'UTC'), 'timestamp') . ", " .
302  $ilDB->quote($this->getEnd()->get(IL_CAL_DATETIME, '', 'UTC'), 'timestamp') . ", " .
303  $ilDB->quote((int) $this->enabledFullTime(), 'integer') . " " .
304  ")";
305  $this->appointment_id = $next_id;
306  $res = $ilDB->manipulate($query);
307 
308  return true;
309  }
$res
Definition: ltiservices.php:66
const IL_CAL_DATETIME
getStart()
Get start of date period.
+ Here is the call graph for this function:

◆ delete()

ilSessionAppointment::delete ( )

Definition at line 329 of file class.ilSessionAppointment.php.

References getAppointmentId().

329  : bool
330  {
331  return self::_delete($this->getAppointmentId());
332  }
+ Here is the call graph for this function:

◆ enabledFullTime()

ilSessionAppointment::enabledFullTime ( )

Definition at line 232 of file class.ilSessionAppointment.php.

References $fulltime.

Referenced by cloneObject(), create(), isFullday(), and update().

232  : bool
233  {
234  return $this->fulltime;
235  }
+ Here is the caller graph for this function:

◆ formatTime()

ilSessionAppointment::formatTime ( )

Definition at line 237 of file class.ilSessionAppointment.php.

References getEndingTime(), getStartingTime(), and timeToString().

237  : string
238  {
239  return $this->timeToString($this->getStartingTime(), $this->getEndingTime());
240  }
timeToString(int $start, int $end)
+ Here is the call graph for this function:

◆ getAppointmentId()

ilSessionAppointment::getAppointmentId ( )

Definition at line 193 of file class.ilSessionAppointment.php.

References $appointment_id.

Referenced by __read(), delete(), and update().

193  : int
194  {
195  return $this->appointment_id;
196  }
+ Here is the caller graph for this function:

◆ getEnd()

ilSessionAppointment::getEnd ( )

Get end of period.

Implements ilDatePeriod.

Definition at line 178 of file class.ilSessionAppointment.php.

References IL_CAL_DATETIME.

Referenced by create(), and update().

178  : ?ilDateTime
179  {
180  return $this->end ?: $this->end = new ilDateTime(date('Y-m-d') . ' 16:00:00', IL_CAL_DATETIME);
181  }
const IL_CAL_DATETIME
+ Here is the caller graph for this function:

◆ getEndingTime()

ilSessionAppointment::getEndingTime ( )

Definition at line 223 of file class.ilSessionAppointment.php.

Referenced by appointmentToString(), cloneObject(), and formatTime().

223  : int
224  {
225  return $this->ending_time ?? mktime(16, 0, 0, (int) date('n', time()), (int) date('j', time()), (int) date('Y', time()));
226  }
+ Here is the caller graph for this function:

◆ getSessionId()

ilSessionAppointment::getSessionId ( )

Definition at line 202 of file class.ilSessionAppointment.php.

References $session_id.

Referenced by create(), and update().

202  : int
203  {
204  return $this->session_id;
205  }
+ Here is the caller graph for this function:

◆ getStart()

ilSessionAppointment::getStart ( )

Get start of date period.

Implements ilDatePeriod.

Definition at line 168 of file class.ilSessionAppointment.php.

References IL_CAL_DATETIME.

Referenced by create(), and update().

168  : ?ilDateTime
169  {
170  return $this->start ?: $this->start = new ilDateTime(date('Y-m-d') . ' 08:00:00', IL_CAL_DATETIME);
171  }
const IL_CAL_DATETIME
+ Here is the caller graph for this function:

◆ getStartingTime()

ilSessionAppointment::getStartingTime ( )

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

Referenced by appointmentToString(), cloneObject(), and formatTime().

213  : int
214  {
215  return $this->starting_time ?? mktime(8, 0, 0, (int) date('n', time()), (int) date('j', time()), (int) date('Y', time()));
216  }
+ Here is the caller graph for this function:

◆ isFullday()

ilSessionAppointment::isFullday ( )

is event a fullday period

Implements ilDatePeriod.

Definition at line 163 of file class.ilSessionAppointment.php.

References enabledFullTime().

Referenced by __read(), and appointmentToString().

163  : bool
164  {
165  return $this->enabledFullTime();
166  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookupLastSessionByCourse()

static ilSessionAppointment::lookupLastSessionByCourse ( int  $a_ref_id)
static
Returns
bool|int

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

References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, ilTree\getChildsByType(), and ILIAS\Repository\int().

Referenced by ILIAS\UI\Component\Legacy\Content\ItemManager\init().

137  {
138  global $DIC;
139 
140  $tree = $DIC->repositoryTree();
141  $ilDB = $DIC->database();
142 
143  $sessions = $tree->getChildsByType($a_ref_id, 'sess');
144  $obj_ids = [];
145  foreach ($sessions as $tree_data) {
146  $obj_ids[] = $tree_data['obj_id'];
147  }
148  if (!count($obj_ids)) {
149  return false;
150  }
151  $query = "SELECT event_id FROM event_appointment " .
152  "WHERE e_start < " . $ilDB->now() . " " .
153  "AND " . $ilDB->in('event_id', $obj_ids, false, 'integer') . " " .
154  "ORDER BY e_start DESC ";
155  $ilDB->setLimit(1, 0);
156  $res = $ilDB->query($query);
157  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
158  $event_id = (int) $row->event_id;
159  }
160  return $event_id ?? 0;
161  }
$res
Definition: ltiservices.php:66
getChildsByType(int $a_node_id, string $a_type)
get child nodes of given node by object type
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookupNextSessionByCourse()

static ilSessionAppointment::lookupNextSessionByCourse ( int  $a_ref_id)
static
Returns
array|bool

Definition at line 81 of file class.ilSessionAppointment.php.

References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, ilTree\getChildsByType(), IL_CAL_DATE, IL_CAL_DAY, and IL_CAL_UNIX.

Referenced by ILIAS\UI\Component\Legacy\Content\ItemManager\init().

82  {
83  global $DIC;
84 
85  $tree = $DIC->repositoryTree();
86  $ilDB = $DIC->database();
87 
88 
89  $sessions = $tree->getChildsByType($a_ref_id, 'sess');
90  $obj_ids = [];
91  foreach ($sessions as $tree_data) {
92  $obj_ids[] = $tree_data['obj_id'];
93  }
94  if (!count($obj_ids)) {
95  return false;
96  }
97 
98  // Try to read the next sessions within the next 24 hours
99  $now = new ilDate(time(), IL_CAL_UNIX);
100  $tomorrow = clone $now;
101  $tomorrow->increment(IL_CAL_DAY, 2);
102 
103  $query = "SELECT event_id FROM event_appointment " .
104  "WHERE e_start > " . $ilDB->quote($now->get(IL_CAL_DATE), 'timestamp') . ' ' .
105  "AND e_start < " . $ilDB->quote($tomorrow->get(IL_CAL_DATE), 'timestamp') . ' ' .
106  "AND " . $ilDB->in('event_id', $obj_ids, false, 'integer') . ' ' .
107  "ORDER BY e_start ";
108 
109  $event_ids = [];
110 
111  $res = $ilDB->query($query);
112  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
113  $event_ids[] = $row->event_id;
114  }
115 
116  if (count($event_ids)) {
117  return $event_ids;
118  }
119 
120  // Alternativ: get next event.
121  $query = "SELECT event_id FROM event_appointment " .
122  "WHERE e_start > " . $ilDB->now() . " " .
123  "AND " . $ilDB->in('event_id', $obj_ids, false, 'integer') . " " .
124  "ORDER BY e_start ";
125  $ilDB->setLimit(1, 0);
126  $res = $ilDB->query($query);
127  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
128  $event_id = $row->event_id;
129  }
130  return isset($event_id) ? [$event_id] : [];
131  }
$res
Definition: ltiservices.php:66
const IL_CAL_UNIX
getChildsByType(int $a_node_id, string $a_type)
get child nodes of given node by object type
const IL_CAL_DAY
global $DIC
Definition: shib_login.php:26
const IL_CAL_DATE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAppointmentId()

ilSessionAppointment::setAppointmentId ( int  $a_appointment_id)

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

188  : void
189  {
190  $this->appointment_id = $a_appointment_id;
191  }

◆ setEnd()

ilSessionAppointment::setEnd ( ilDateTime  $a_end)

Definition at line 183 of file class.ilSessionAppointment.php.

183  : void
184  {
185  $this->end = $a_end;
186  }

◆ setEndingTime()

ilSessionAppointment::setEndingTime ( int  $a_ending_time)

Definition at line 218 of file class.ilSessionAppointment.php.

References IL_CAL_UNIX.

218  : void
219  {
220  $this->ending_time = $a_ending_time;
221  $this->end = new ilDateTime($this->ending_time, IL_CAL_UNIX);
222  }
const IL_CAL_UNIX

◆ setSessionId()

ilSessionAppointment::setSessionId ( int  $a_session_id)

Definition at line 198 of file class.ilSessionAppointment.php.

Referenced by __read().

198  : void
199  {
200  $this->session_id = $a_session_id;
201  }
+ Here is the caller graph for this function:

◆ setStart()

ilSessionAppointment::setStart ( ilDateTime  $a_start)

Definition at line 173 of file class.ilSessionAppointment.php.

173  : void
174  {
175  $this->start = $a_start;
176  }

◆ setStartingTime()

ilSessionAppointment::setStartingTime ( int  $a_starting_time)

Definition at line 207 of file class.ilSessionAppointment.php.

References IL_CAL_UNIX.

207  : void
208  {
209  $this->starting_time = $a_starting_time;
210  $this->start = new ilDateTime($this->starting_time, IL_CAL_UNIX);
211  }
const IL_CAL_UNIX

◆ timeToString()

ilSessionAppointment::timeToString ( int  $start,
int  $end 
)

Definition at line 242 of file class.ilSessionAppointment.php.

References $end, $lng, $start, and ilLanguage\txt().

Referenced by formatTime().

242  : string
243  {
244  $lng = $this->lng;
245 
246  $start = date($lng->txt('lang_timeformat_no_sec'), $start);
247  $end = date($lng->txt('lang_timeformat_no_sec'), $end);
248 
249  return $start . ' - ' . $end;
250  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleFullTime()

ilSessionAppointment::toggleFullTime ( bool  $a_status)

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

Referenced by __read().

228  : void
229  {
230  $this->fulltime = $a_status;
231  }
+ Here is the caller graph for this function:

◆ update()

ilSessionAppointment::update ( )

Definition at line 311 of file class.ilSessionAppointment.php.

References $db, $ilDB, $res, enabledFullTime(), getAppointmentId(), getEnd(), getSessionId(), getStart(), and IL_CAL_DATETIME.

311  : bool
312  {
313  $ilDB = $this->db;
314 
315  if (!$this->getSessionId()) {
316  return false;
317  }
318  $query = "UPDATE event_appointment " .
319  "SET event_id = " . $ilDB->quote($this->getSessionId(), 'integer') . ", " .
320  "e_start = " . $ilDB->quote($this->getStart()->get(IL_CAL_DATETIME, '', 'UTC'), 'timestamp') . ", " .
321  "e_end = " . $ilDB->quote($this->getEnd()->get(IL_CAL_DATETIME, '', 'UTC'), 'timestamp') . ", " .
322  "fulltime = " . $ilDB->quote((int) $this->enabledFullTime(), 'integer') . " " .
323  "WHERE appointment_id = " . $ilDB->quote($this->getAppointmentId(), 'integer') . " ";
324  $res = $ilDB->manipulate($query);
325 
326  return true;
327  }
$res
Definition: ltiservices.php:66
const IL_CAL_DATETIME
getStart()
Get start of date period.
+ Here is the call graph for this function:

◆ validate()

ilSessionAppointment::validate ( )

Definition at line 378 of file class.ilSessionAppointment.php.

References ILIAS\Repository\lng().

378  : bool
379  {
380  if ($this->starting_time > $this->ending_time) {
381  $this->ilErr->appendMessage($this->lng->txt('event_etime_smaller_stime'));
382  return false;
383  }
384  return true;
385  }
+ Here is the call graph for this function:

Field Documentation

◆ $appointment_id

int ilSessionAppointment::$appointment_id = 0
protected

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

Referenced by getAppointmentId().

◆ $db

ilDBInterface ilSessionAppointment::$db
protected

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

Referenced by __read(), create(), and update().

◆ $end

ilDateTime ilSessionAppointment::$end = null
protected

Definition at line 36 of file class.ilSessionAppointment.php.

Referenced by timeToString().

◆ $ending_time

int ilSessionAppointment::$ending_time = 0
protected

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

◆ $fulltime

bool ilSessionAppointment::$fulltime = false
protected

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

Referenced by enabledFullTime().

◆ $ilErr

ilErrorHandling ilSessionAppointment::$ilErr
protected

Definition at line 31 of file class.ilSessionAppointment.php.

◆ $lng

ilLanguage ilSessionAppointment::$lng
protected

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

Referenced by timeToString().

◆ $session_id

int ilSessionAppointment::$session_id = 0
protected

Definition at line 41 of file class.ilSessionAppointment.php.

Referenced by getSessionId().

◆ $start

ilDateTime ilSessionAppointment::$start = null
protected

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

Referenced by timeToString().

◆ $starting_time

int ilSessionAppointment::$starting_time = 0
protected

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

◆ $tree

ilTree ilSessionAppointment::$tree
protected

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


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