ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjectActivation.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
13 {
14  const ERR_SUG_START_END = 1;
15 
16 
20  protected $error;
21 
25  protected $lng;
26 
30  protected $db;
31 
32  protected $timing_type;
33  protected $timing_start;
34  protected $timing_end;
35  protected $suggestion_start;
36  protected $suggestion_end;
37  protected $visible;
38  protected $changeable;
39 
42 
43  protected static $preloaded_data = array();
44 
45  const TIMINGS_ACTIVATION = 0;
47  const TIMINGS_PRESETTING = 2;
48  const TIMINGS_FIXED = 3; // session only => obsolete?
49 
50  public function __construct()
51  {
52  global $DIC;
53 
54  $this->error = $DIC["ilErr"];
55  $this->lng = $DIC->language();
56  $this->db = $DIC->database();
57  }
58 
65  public function setTimingType($a_type)
66  {
67  $this->timing_type = $a_type;
68  }
69 
76  public function getTimingType()
77  {
78  return $this->timing_type;
79  }
80 
86  public function setTimingStart($a_start)
87  {
88  $this->timing_start = $a_start;
89  }
90 
96  public function getTimingStart()
97  {
98  return $this->timing_start;
99  }
100 
106  public function setTimingEnd($a_end)
107  {
108  $this->timing_end = $a_end;
109  }
110 
116  public function getTimingEnd()
117  {
118  return $this->timing_end;
119  }
120 
126  public function setSuggestionStart($a_start)
127  {
128  $this->suggestion_start = $a_start;
129  }
130 
136  public function getSuggestionStart()
137  {
139  }
140 
141  public function getSuggestionStartRelative()
142  {
144  }
145 
146  public function setSuggestionStartRelative($a_start)
147  {
148  $this->suggestion_start_rel = $a_start;
149  }
150 
151  public function getSuggestionEndRelative()
152  {
154  }
155 
156  public function setSuggestionEndRelative($a_end)
157  {
158  $this->suggestion_end_rel = $a_end;
159  }
160 
161  public function getEaliestStartRelative()
162  {
163  return $this->earliest_start_rel;
164  }
165 
166  public function setEarliestStartRelative($a_start)
167  {
168  $this->earliest_start_rel = $a_start;
169  }
170 
176  public function setSuggestionEnd($a_end)
177  {
178  $this->suggestion_end = $a_end;
179  }
180 
186  public function getSuggestionEnd()
187  {
188  return $this->suggestion_end;
189  }
190 
196  public function setEarliestStart($a_start)
197  {
198  $this->earliest_start = $a_start;
199  }
200 
206  public function getEarliestStart()
207  {
208  return $this->earliest_start;
209  }
210 
211 
217  public function toggleVisible($a_status)
218  {
219  $this->visible = (int) $a_status;
220  }
221 
227  public function enabledVisible()
228  {
229  return (bool) $this->visible;
230  }
231 
237  public function toggleChangeable($a_status)
238  {
239  $this->changeable = (int) $a_status;
240  }
241 
247  public function enabledChangeable()
248  {
249  return (bool) $this->changeable;
250  }
251 
257  public function validateActivation()
258  {
260  $lng = $this->lng;
261 
262  $ilErr->setMessage('');
263 
264  if ($this->getTimingType() == self::TIMINGS_ACTIVATION) {
265  if ($this->getTimingStart() > $this->getTimingEnd()) {
266  $ilErr->appendMessage($lng->txt("crs_activation_start_invalid"));
267  }
268  } elseif ($this->getTimingType() == self::TIMINGS_PRESETTING) {
269  if ($this->getSuggestionStart() > $this->getSuggestionEnd()) {
270  $ilErr->appendMessage($lng->txt('crs_timing_err_sug_start_end'));
271  }
272  }
273 
274  if ($ilErr->getMessage()) {
275  return false;
276  }
277  return true;
278  }
279 
283  public function validateRelativePlaning()
284  {
285  $errors = array();
286 
287  if ($this->getSuggestionStartRelative() >= $this->getSuggestionEndRelative()) {
288  $errors[] = self::ERR_SUG_START_END;
289  } elseif ($this->getSuggestionStartRelative() < 0) {
290  $errors[] = self::ERR_SUG_START_END;
291  }
292  return $errors;
293  }
294 
301  public function update($a_ref_id, $a_parent_id = null)
302  {
303  $ilDB = $this->db;
304 
305  // #10110
306  $query = "UPDATE crs_items SET " .
307  "timing_type = " . $ilDB->quote($this->getTimingType(), 'integer') . ", " .
308  "timing_start = " . $ilDB->quote((int) $this->getTimingStart(), 'integer') . ", " .
309  "timing_end = " . $ilDB->quote((int) $this->getTimingEnd(), 'integer') . ", " .
310  "suggestion_start = " . $ilDB->quote((int) $this->getSuggestionStart(), 'integer') . ", " .
311  "suggestion_end = " . $ilDB->quote((int) $this->getSuggestionEnd(), 'integer') . ", " .
312  "changeable = " . $ilDB->quote($this->enabledChangeable(), 'integer') . ", " .
313  'suggestion_start_rel = ' . $ilDB->quote($this->getSuggestionStartRelative(), 'integer') . ', ' .
314  'suggestion_end_rel = ' . $ilDB->quote($this->getSuggestionEndRelative(), 'integer') . ', ';
315 
316  if ($a_parent_id) {
317  $query .= "parent_id = " . $ilDB->quote($a_parent_id, 'integer') . ", ";
318  }
319 
320  $query .= "visible = " . $ilDB->quote($this->enabledVisible(), 'integer') . " " .
321  "WHERE obj_id = " . $ilDB->quote($a_ref_id, 'integer');
322  $ilDB->manipulate($query);
323 
324  unset(self::$preloaded_data[$a_ref_id]);
325 
326  return true;
327  }
328 
334  public static function preloadData(array $a_ref_ids)
335  {
336  global $DIC;
337 
338  $ilDB = $DIC->database();
339 
340  $sql = "SELECT * FROM crs_items" .
341  " WHERE " . $ilDB->in("obj_id", $a_ref_ids, "", "integer");
342  $set = $ilDB->query($sql);
343  while ($row = $ilDB->fetchAssoc($set)) {
344  self::$preloaded_data[$row["obj_id"]] = $row;
345  }
346  }
347 
354  public static function getItem($a_ref_id)
355  {
356  global $DIC;
357 
358  $ilDB = $DIC->database();
359 
360  if (isset(self::$preloaded_data[$a_ref_id])) {
361  return self::$preloaded_data[$a_ref_id];
362  }
363 
364  $sql = "SELECT * FROM crs_items" .
365  " WHERE obj_id = " . $ilDB->quote($a_ref_id, "integer");
366  $set = $ilDB->query($sql);
367  $row = $ilDB->fetchAssoc($set);
368 
369  if (!isset($row["obj_id"])) {
370  $row = self::createDefaultEntry($a_ref_id);
371  }
372  if ($row["obj_id"]) {
373  self::$preloaded_data[$row["obj_id"]] = $row;
374  }
375  return $row;
376  }
377 
383  public static function addAdditionalSubItemInformation(array &$a_item)
384  {
385  global $DIC;
386 
387  $ilUser = $DIC->user();
388 
389  $item = self::getItem($a_item['ref_id']);
390 
391  $a_item['obj_id'] = ($a_item['obj_id'] > 0)
392  ? $a_item['obj_id']
393  : ilObject::_lookupObjId($a_item['ref_id']);
394  $a_item['type'] = ($a_item['type'] != '')
395  ? $a_item['type']
396  : ilObject::_lookupType($a_item['obj_id']);
397 
398  $a_item['timing_type'] = $item['timing_type'];
399 
400  if ($item['changeable'] &&
401  $item['timing_type'] == self::TIMINGS_PRESETTING) {
402  // cognos-blu-patch: begin
403  include_once './Modules/Course/classes/Timings/class.ilTimingUser.php';
404  $user_data = new ilTimingUser($a_item['ref_id'], $ilUser->getId());
405  if ($user_data->isScheduled()) {
406  $a_item['start'] = $user_data->getStart()->get(IL_CAL_UNIX);
407  $a_item['end'] = $user_data->getEnd()->get(IL_CAL_UNIX);
408  $a_item['activation_info'] = 'crs_timings_planed_info';
409  } else {
410  $a_item['start'] = $item['suggestion_start'];
411  $a_item['end'] = $item['suggestion_end'];
412  $a_item['activation_info'] = 'crs_timings_suggested_info';
413  }
414  // cognos-blu-patch: end
415  } elseif ($item['timing_type'] == self::TIMINGS_PRESETTING) {
416  $a_item['start'] = $item['suggestion_start'];
417  $a_item['end'] = $item['suggestion_end'];
418  $a_item['activation_info'] = 'crs_timings_suggested_info';
419  } elseif ($item['timing_type'] == self::TIMINGS_ACTIVATION) {
420  $a_item['start'] = $item['timing_start'];
421  $a_item['end'] = $item['timing_end'];
422  $a_item['activation_info'] = 'obj_activation_list_gui';
423  } else {
424  $a_item['start'] = 'abc';
425  }
426 
427  // #7359 - session sorting should always base on appointment date
428  if ($a_item['type'] == 'sess') {
429  include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
430  $info = ilSessionAppointment::_lookupAppointment($a_item['obj_id']);
431 
432  // #11987
433  $a_item['masked_start'] = $a_item['start'];
434  $a_item['masked_end'] = $a_item['end'];
435  $a_item['start'] = $info['start'];
436  $a_item['end'] = $info['end'];
437  }
438  }
439 
447  public static function addListGUIActivationProperty(ilObjectListGUI $a_list_gui, array &$a_item)
448  {
449  global $DIC;
450 
451  $lng = $DIC->language();
452 
453  self::addAdditionalSubItemInformation($a_item);
454  if (isset($a_item['timing_type'])) {
455  if (!isset($a_item['masked_start'])) {
456  $start = $a_item['start'];
457  $end = $a_item['end'];
458  } else {
459  $start = $a_item['masked_start'];
460  $end = $a_item['masked_end'];
461  }
462  $activation = '';
463  switch ($a_item['timing_type']) {
465  $activation = ilDatePresentation::formatPeriod(
468  );
469  break;
470 
472  $activation = ilDatePresentation::formatPeriod(
473  new ilDate($start, IL_CAL_UNIX),
474  new ilDate($end, IL_CAL_UNIX)
475  );
476  break;
477  }
478  if ($activation != "") {
479  global $DIC;
480 
481  $lng = $DIC->language();
482  $lng->loadLanguageModule('crs');
483 
484  $a_list_gui->addCustomProperty(
485  $lng->txt($a_item['activation_info']),
486  $activation,
487  false,
488  true
489  );
490  }
491  }
492  }
493 
500  protected static function createDefaultEntry($a_ref_id)
501  {
502  global $DIC;
503 
504  $ilDB = $DIC->database();
505  $tree = $DIC->repositoryTree();
506 
507  $parent_id = $tree->getParentId($a_ref_id);
508  if (!$parent_id) {
509  return;
510  }
511 
512 
513  $ilAtomQuery = $ilDB->buildAtomQuery();
514  $ilAtomQuery->addTableLock("crs_items");
515 
516  $ilAtomQuery->addQueryCallable(function (ilDBInterface $ilDB) use ($a_ref_id, $parent_id, &$a_item) {
517  $sql = "SELECT * FROM crs_items" .
518  " WHERE obj_id = " . $ilDB->quote($a_ref_id, "integer");
519  $set = $ilDB->query($sql);
520  if (!$ilDB->numRows($set)) {
521  $now = time();
522  $now_parts = getdate($now);
523 
524  $a_item = array();
525  $a_item["timing_type"] = self::TIMINGS_DEACTIVATED;
526  $a_item["timing_start"] = $now;
527  $a_item["timing_end"] = $now;
528  $a_item["suggestion_start"] = $now;
529  $a_item["suggestion_end"] = $now;
530  $a_item['visible'] = 0;
531  $a_item['changeable'] = 0;
532 
533  $query = "INSERT INTO crs_items (parent_id,obj_id,timing_type,timing_start,timing_end," .
534  "suggestion_start,suggestion_end, " .
535  "changeable,visible,suggestion_start_rel, suggestion_end_rel, position) " .
536  "VALUES( " .
537  $ilDB->quote($parent_id, 'integer') . "," .
538  $ilDB->quote($a_ref_id, 'integer') . "," .
539  $ilDB->quote($a_item["timing_type"], 'integer') . "," .
540  $ilDB->quote($a_item["timing_start"], 'integer') . "," .
541  $ilDB->quote($a_item["timing_end"], 'integer') . "," .
542  $ilDB->quote($a_item["suggestion_start"], 'integer') . "," .
543  $ilDB->quote($a_item["suggestion_end"], 'integer') . "," .
544  $ilDB->quote($a_item["changeable"], 'integer') . "," .
545  $ilDB->quote($a_item["visible"], 'integer') . ", " .
546  $ilDB->quote($a_item["suggestion_start_rel"], 'integer') . "," .
547  $ilDB->quote($a_item['suggestion_end_rel'], 'integer') . ", " .
548  $ilDB->quote(0, 'integer') . ")";
549  $ilDB->manipulate($query);
550  }
551  });
552 
553  $ilAtomQuery->run();
554 
555  // #9982 - to make getItem()-cache work
556  $a_item["obj_id"] = $a_ref_id;
557  $a_item["parent_id"] = $parent_id;
558 
559  return $a_item;
560  }
561 
567  public static function deleteAllEntries($a_ref_id)
568  {
569  global $DIC;
570 
571  $ilDB = $DIC->database();
572 
573  if (!$a_ref_id) {
574  return;
575  }
576 
577  $query = "DELETE FROM crs_items " .
578  "WHERE obj_id = " . $ilDB->quote($a_ref_id, 'integer');
579  $ilDB->manipulate($query);
580 
581  $query = "DELETE FROM crs_items " .
582  "WHERE parent_id = " . $ilDB->quote($a_ref_id, 'integer');
583  $ilDB->manipulate($query);
584 
585  return true;
586  }
587 
595  public static function cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
596  {
597  global $DIC;
598 
599  $ilLog = $DIC["ilLog"];
600 
601  $ilLog->write(__METHOD__ . ': Begin course items...' . $a_ref_id);
602 
603  $items = self::getItems($a_ref_id, false);
604  if (!$items) {
605  $ilLog->write(__METHOD__ . ': No course items found.');
606  return true;
607  }
608 
609  // new course item object
610  if (!is_object($new_container = ilObjectFactory::getInstanceByRefId($a_target_id, false))) {
611  $ilLog->write(__METHOD__ . ': Cannot create target object.');
612  return false;
613  }
614 
615  include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
616  $cp_options = ilCopyWizardOptions::_getInstance($a_copy_id);
617  $mappings = $cp_options->getMappings();
618 
619  foreach ($items as $item) {
620  if (!isset($mappings[$item['parent_id']]) or !$mappings[$item['parent_id']]) {
621  $ilLog->write(__METHOD__ . ': No mapping for parent nr. ' . $item['parent_id']);
622  continue;
623  }
624  if (!isset($mappings[$item['obj_id']]) or !$mappings[$item['obj_id']]) {
625  $ilLog->write(__METHOD__ . ': No mapping for item nr. ' . $item['obj_id']);
626  continue;
627  }
628  $new_item_id = $mappings[$item['obj_id']];
629  $new_parent = $mappings[$item['parent_id']];
630 
631  $new_item = new self();
632  $new_item->setTimingType($item['timing_type']);
633  $new_item->setTimingStart($item['timing_start']);
634  $new_item->setTimingEnd($item['timing_end']);
635  $new_item->setSuggestionStart($item['suggestion_start']);
636  $new_item->setSuggestionEnd($item['suggestion_end']);
637  $new_item->toggleChangeable($item['changeable']);
638  $new_item->toggleVisible($item['visible']);
639  $new_item->update($new_item_id, $new_parent);
640  $new_item->setSuggestionStartRelative($item['suggestion_start_rel']);
641  $new_item->setSuggestionEndRelative($item['suggestion_end_rel']);
642  $new_item->createDefaultEntry($new_item_id);
643  $new_item->update($new_item_id);
644  }
645  }
646 
647 
648  //
649  // TIMINGS VIEW RELATED (COURSE ONLY)
650  //
651 
658  public static function hasTimings($a_ref_id)
659  {
660  global $DIC;
661 
662  $tree = $DIC->repositoryTree();
663  $ilDB = $DIC->database();
664 
665  $subtree = $tree->getSubTree($tree->getNodeData($a_ref_id));
666  $ref_ids = array();
667  foreach ($subtree as $node) {
668  $ref_ids[] = $node['ref_id'];
669  }
670 
671  $query = "SELECT * FROM crs_items " .
672  "WHERE timing_type = " . $ilDB->quote(self::TIMINGS_PRESETTING, 'integer') . " " .
673  "AND " . $ilDB->in('obj_id', $ref_ids, false, 'integer');
674  $res = $ilDB->query($query);
675  return $res->numRows() ? true :false;
676  }
677 
684  public static function hasChangeableTimings($a_ref_id)
685  {
686  global $DIC;
687 
688  $tree = $DIC->repositoryTree();
689  $ilDB = $DIC->database();
690 
691  $subtree = $tree->getSubTree($tree->getNodeData($a_ref_id));
692  $ref_ids = array();
693  foreach ($subtree as $node) {
694  $ref_ids[] = $node['ref_id'];
695  }
696 
697  $query = "SELECT * FROM crs_items " .
698  "WHERE timing_type = " . $ilDB->quote(self::TIMINGS_PRESETTING, 'integer') . " " .
699  "AND changeable = " . $ilDB->quote(1, 'integer') . " " .
700  "AND " . $ilDB->in('obj_id', $ref_ids, false, 'integer');
701  $res = $ilDB->query($query);
702  return $res->numRows() ? true : false;
703  }
704 
711  protected static function processListItems(array $a_ref_ids)
712  {
713  global $DIC;
714 
715  $tree = $DIC->repositoryTree();
716 
717  $res = array();
718 
719  foreach ($a_ref_ids as $item_ref_id) {
720  if ($tree->isDeleted($item_ref_id)) {
721  continue;
722  }
723  // #7571: when node is removed from system, e.g. inactive trashcan, an empty array is returned
724  $node = $tree->getNodeData($item_ref_id);
725  if ($node["ref_id"] != $item_ref_id) {
726  continue;
727  }
728  $res[$item_ref_id] = $node;
729  }
730 
731  if (sizeof($res)) {
732  self::preloadData(array_keys($res));
733  foreach ($res as $idx => $item) {
734  self::addAdditionalSubItemInformation($item);
735  $res[$idx] = $item;
736  }
737  }
738 
739  return array_values($res);
740  }
741 
748  public static function getItemsByEvent($a_event_id)
749  {
750  include_once 'Modules/Session/classes/class.ilEventItems.php';
751  $event_items = new ilEventItems($a_event_id);
752  return self::processListItems($event_items->getItems());
753  }
754 
761  public static function getItemsByItemGroup($a_item_group_ref_id)
762  {
763  include_once 'Modules/ItemGroup/classes/class.ilItemGroupItems.php';
764  $ig_items = new ilItemGroupItems($a_item_group_ref_id);
765  $items = $ig_items->getValidItems();
766  return self::processListItems($items);
767  }
768 
775  public static function getItemsByObjective($a_objective_id)
776  {
777  include_once('./Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
778  $item_ids = ilCourseObjectiveMaterials::_getAssignedMaterials($a_objective_id);
779  return self::processListItems($item_ids);
780  }
781 
789  public static function getItems($a_parent_id, $a_with_list_data = true)
790  {
791  global $DIC;
792 
793  $tree = $DIC->repositoryTree();
794 
795  $items = array();
796 
797  $ref_ids = array();
798  foreach ($tree->getChilds($a_parent_id) as $item) {
799  if ($item['type'] != 'rolf') {
800  $items[] = $item;
801  $ref_ids[] = $item['ref_id'];
802  }
803  }
804 
805  if ($ref_ids) {
806  self::preloadData($ref_ids);
807 
808  foreach ($items as $idx => $item) {
809  if (!$a_with_list_data) {
810  $items[$idx] = array_merge($item, self::getItem($item['ref_id']));
811  } else {
812  self::addAdditionalSubItemInformation($item);
813  $items[$idx] = $item;
814  }
815  }
816  }
817  return $items;
818  }
819 
826  public static function getTimingsAdministrationItems($a_parent_id)
827  {
828  $items = self::getItems($a_parent_id, false);
829 
830  if ($items) {
831  $active = $inactive = array();
832  foreach ($items as $item) {
833  // active should be first in order
834  if ($item['timing_type'] == self::TIMINGS_DEACTIVATED) {
835  $inactive[] = $item;
836  } else {
837  $active[] = $item;
838  }
839  }
840 
841  $active = ilUtil::sortArray($active, 'start', 'asc');
842  $inactive = ilUtil::sortArray($inactive, 'title', 'asc');
843  $items = array_merge($active, $inactive);
844  }
845 
846  return $items;
847  }
848 
855  public static function getTimingsItems($a_container_ref_id)
856  {
857  global $DIC;
858 
859  $objDefinition = $DIC["objDefinition"];
860 
861  $filtered = array();
862 
863  include_once 'Modules/Session/classes/class.ilEventItems.php';
864  $event_items = ilEventItems::_getItemsOfContainer($a_container_ref_id);
865  foreach (self::getTimingsAdministrationItems($a_container_ref_id) as $item) {
866  if (!in_array($item['ref_id'], $event_items) &&
867  !$objDefinition->isSideBlock($item['type'])) {
868  $filtered[] = $item;
869  }
870  }
871 
872  return $filtered;
873  }
874 
880  public function read($a_ref_id, $a_parent_id = 0)
881  {
882  global $DIC;
883  $ilDB = $DIC->database();
884 
885  $query = 'SELECT * FROM crs_items ' .
886  'WHERE obj_id = ' . $ilDB->quote($a_ref_id, 'integer') . ' ';
887 
888  if ($a_parent_id) {
889  $query .= ('AND parent_id = ' . $ilDB->quote($a_parent_id, 'integer') . ' ');
890  }
891  $res = $ilDB->query($query);
892  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
893  $this->setSuggestionStart($row->suggestion_start);
894  $this->setSuggestionEnd($row->suggestion_end);
895  $this->setSuggestionStartRelative($row->suggestion_start_rel);
896  $this->setSuggestionEndRelative($row->suggestion_end_rel);
897  $this->toggleVisible($row->visible);
898  $this->toggleChangeable($row->changeable);
899  $this->setTimingType($row->timing_type);
900  $this->setTimingStart($row->timing_start);
901  $this->setTimingEnd($row->timing_end);
902  }
903  }
904 }
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
getTimingEnd()
Get timing end.
validateActivation()
Validate current properties.
static createDefaultEntry($a_ref_id)
Create db entry with default values.
setTimingStart($a_start)
Set timing start.
static getItems($a_parent_id, $a_with_list_data=true)
Get sub item data.
static getItemsByEvent($a_event_id)
Get session material / event items.
getStart()
Use to set start date.
update($a_ref_id, $a_parent_id=null)
Update db entry.
global $DIC
Definition: saml.php:7
static hasTimings($a_ref_id)
Check if there is any active timing (in subtree)
static _getItemsOfContainer($a_ref_id)
static getTimingsItems($a_container_ref_id)
Get (sub) item data for timings view (no session material, no side blocks)
TableGUI class for timings administration.
static getItem($a_ref_id)
Get item data.
const IL_CAL_UNIX
enabledVisible()
Get visible status.
$ilErr
Definition: raiseError.php:18
getSuggestionEnd()
Get suggestion end.
numRows($query_result)
$start
Definition: bench.php:8
$a_type
Definition: workflow.php:92
addCustomProperty( $a_property="", $a_value="", $a_alert=false, $a_newline=false)
add custom property
getTimingStart()
Get timing start.
static addAdditionalSubItemInformation(array &$a_item)
Parse item data for list entries.
quote($value, $type)
toggleVisible($a_status)
Set visible status.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
setEarliestStart($a_start)
Set earliest start.
Class for single dates.
foreach($_POST as $key=> $value) $res
static getTimingsAdministrationItems($a_parent_id)
Get (sub) item data for timings administration view (active/inactive)
static hasChangeableTimings($a_ref_id)
Check if there is any active changeable timing (in subtree)
static _lookupObjId($a_id)
setTimingEnd($a_end)
Set timing end.
Class ilObjectListGUI.
Date and time handling
$ilUser
Definition: imgupload.php:18
Item group items.
static processListItems(array $a_ref_ids)
Validate ref ids and add list data.
$query
static preloadData(array $a_ref_ids)
Preload data to internal cache.
getTimingType()
get timing type
getSuggestionStart()
Get suggestion start.
static addListGUIActivationProperty(ilObjectListGUI $a_list_gui, array &$a_item)
Get timing details for list gui.
enabledChangeable()
Get changeable status.
static _lookupType($a_id, $a_reference=false)
lookup object type
static deleteAllEntries($a_ref_id)
Delete all db entries for ref id.
static _getAssignedMaterials($a_objective_id)
get assigned materials
setSuggestionStart($a_start)
Set suggestion start.
setTimingType($a_type)
Set timing type.
$row
$errors
Definition: index.php:6
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
static getItemsByObjective($a_objective_id)
Get objective items.
toggleChangeable($a_status)
Set changeable status.
static cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
Clone dependencies.
static _lookupAppointment($a_obj_id)
lookup appointment
global $ilDB
query($query)
Run a (read-only) Query on the database.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
getEarliestStart()
Get earliest start.
static getItemsByItemGroup($a_item_group_ref_id)
Get materials of item group.
$info
Definition: index.php:5
Class ilObjectActivation.
setSuggestionEnd($a_end)
Set suggestion end.
read($a_ref_id, $a_parent_id=0)
manipulate($query)
Run a (write) Query on the database.
class ilEvent