ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilSessionDataSet Class Reference

Session data set class. More...

+ Inheritance diagram for ilSessionDataSet:
+ Collaboration diagram for ilSessionDataSet:

Public Member Functions

 __construct ()
 
 setTargetId (string $target_id)
 
 getSupportedVersions ()
 
 readData (string $a_entity, string $a_version, array $a_ids)
 
 getXmlRecord (string $a_entity, string $a_version, array $a_set)
 
 importRecord (string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version)
 
- Public Member Functions inherited from ilDataSet
 __construct ()
 
 init (string $a_entity, string $a_schema_version)
 Init. More...
 
 getSupportedVersions ()
 
 readData (string $a_entity, string $a_version, array $a_ids)
 Read data from DB. More...
 
 initByExporter (ilXmlExporter $xml_exporter)
 
 setImportDirectory (string $a_val)
 
 getImportDirectory ()
 
 setDSPrefix (string $a_val)
 
 getDSPrefix ()
 
 getDSPrefixString ()
 
 getDirectDataFromQuery (string $a_query, bool $a_convert_to_leading_upper=true, bool $a_set=true)
 Get data from query.This is a standard procedure, all db field names are directly mapped to abstract fields. More...
 
 convertToLeadingUpper (string $a_str)
 Make xyz_abc a XyzAbc string. More...
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, ?array $a_ids, string $a_field="", bool $a_omit_header=false, bool $a_omit_types=false)
 Get xml representation <dataset install_id="123" install_url="..."> <types entity="table_name" version="4.0.1"> <ftype name="field_1" type="text"> <ftype name="field_2" type="date"> <ftype name="field_3" type="integer"> </types> <types ...> ... More...
 
 addRecordsXml (ilXmlWriter $a_writer, array $a_prefixes, string $a_entity, string $a_schema_version, array $a_ids, ?string $a_field="")
 
 afterXmlRecordWriting (string $a_entity, string $a_version, array $a_set)
 
 getNamespaces (array &$namespaces, string $a_entity, string $a_schema_version)
 
 getXmlRecord (string $a_entity, string $a_version, array $a_set)
 Get xml record for version. More...
 
 getXmlTypes (string $a_entity, string $a_version)
 Get xml types. More...
 
 getXMLEntityName (string $a_entity, string $a_version)
 Get entity name for xml (may be overwritten) More...
 
 getXMLEntityTag (string $a_entity, string $a_schema_version)
 Get entity tag. More...
 
 setImport (ilSurveyImporter $a_val)
 
 getImport ()
 
 setCurrentInstallationId (string $a_val)
 
 getCurrentInstallationId ()
 
 importRecord (string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version)
 Needs to be overwritten for import use case. More...
 
 getCollection (array $record, string $entity, string $schema_version, string $field, string $value)
 
 getContainerExportConfig (array $record, string $entity, string $schema_version, string $field, string $value)
 

Protected Member Functions

 getXmlNamespace (string $a_entity, string $a_schema_version)
 
 getTypes (string $a_entity, string $a_version)
 
 getDependencies (string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null)
 
 readDidacticTemplateType (array $a_obj_ids)
 
 applyDidacticTemplate (ilObject $rep_object, int $tpl_id)
 
- Protected Member Functions inherited from ilDataSet
 getTypes (string $a_entity, string $a_version)
 Get (abstract) types for (abstract) field names. More...
 
 getXmlNamespace (string $a_entity, string $a_schema_version)
 
 getExportDirInContainer (string $exp_dir)
 
 getIRSSContainerExportConfig (StorableResource $source_container, string $source_path, string $target_path="")
 
 getDependencies (string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null)
 
 createObjectExportId (string $a_type, string $a_id)
 Build ilias export id. More...
 
 parseObjectExportId (string $a_id, ?string $a_fallback_id=null)
 Parse export id. More...
 
 stripTags (array $rec, array $omit_keys=[])
 

Protected Attributes

ilLogger $logger
 
string $target_id = ""
 
ilObjSession $current_obj
 
- Protected Attributes inherited from ilDataSet
ILIAS ResourceStorage Services $irss
 
string $current_installation_id = ""
 
array $data = []
 
ilDBInterface $db
 
ilLogger $ds_log
 
string $import_directory = ""
 
string $entity = ""
 
string $schema_version = ""
 
string $component_export_dir = ""
 
string $ds_prefix = "ds"
 
string $version = ""
 
ilSurveyImporter $import
 
ilExport $export
 

Additional Inherited Members

- Data Fields inherited from ilDataSet
const DATASET_NS = 'http://www.ilias.de/Services/DataSet/ds/4_3'
 
const DATASET_NS_PREFIX = 'ds'
 
const EXPORT_NO_INST_ID = 1
 
const EXPORT_ID_ILIAS_LOCAL = 2
 
const EXPORT_ID_ILIAS_LOCAL_INVALID = 3
 
const EXPORT_ID_ILIAS_REMOTE = 4
 
const EXPORT_ID_ILIAS_REMOTE_INVALID = 5
 
const EXPORT_ID = 6
 
const EXPORT_ID_INVALID = 7
 
int $dircnt = 0
 

Detailed Description

Session data set class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilSessionDataSet::__construct ( )

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\logger().

36  {
37  global $DIC;
38 
40  $this->logger = $DIC->logger()->sess();
41  }
global $DIC
Definition: shib_login.php:25
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ applyDidacticTemplate()

ilSessionDataSet::applyDidacticTemplate ( ilObject  $rep_object,
int  $tpl_id 
)
protected

Definition at line 443 of file class.ilSessionDataSet.php.

References ilObject\applyDidacticTemplate(), ilDidacticTemplateSettings\getInstanceByObjectType(), and ILIAS\Repository\logger().

Referenced by importRecord().

443  : void
444  {
445  $this->logger->debug('Apply didactic template');
446 
447  if ($tpl_id == 0) {
448  $this->logger->debug('Default permissions');
449  // Default template
450  return;
451  }
452 
453  $templates = ilDidacticTemplateSettings::getInstanceByObjectType('sess')->getTemplates();
454  foreach ($templates as $template) {
455  if ($template->isAutoGenerated()) {
456  $this->logger->debug('Apply first auto generated');
457  $rep_object->applyDidacticTemplate($template->getId());
458  }
459  }
460  }
applyDidacticTemplate(int $tpl_id)
static getInstanceByObjectType(string $a_obj_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDependencies()

ilSessionDataSet::getDependencies ( string  $a_entity,
string  $a_version,
?array  $a_rec = null,
?array  $a_ids = null 
)
protected

Definition at line 313 of file class.ilSessionDataSet.php.

318  : array {
319  switch ($a_entity) {
320  case "sess":
321  return array(
322  "sess_item" => array("ids" => ($a_rec["Id"] ?? ''))
323  );
324  }
325 
326  return [];
327  }

◆ getSupportedVersions()

ilSessionDataSet::getSupportedVersions ( )

Definition at line 48 of file class.ilSessionDataSet.php.

48  : array
49  {
50  return ['9.0'];
51  //return array("4.1.0", "5.0.0", "5.1.0", '5.4.0', '7.0');
52  }

◆ getTypes()

ilSessionDataSet::getTypes ( string  $a_entity,
string  $a_version 
)
protected

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

62  : array
63  {
64  if ($a_entity == "sess") {
65  switch ($a_version) {
66  case "4.1.0":
67  return array(
68  "Id" => "integer",
69  "Title" => "text",
70  "Description" => "text",
71  "Location" => "text",
72  "TutorName" => "text",
73  "TutorEmail" => "text",
74  "TutorPhone" => "text",
75  "Details" => "text",
76  "Registration" => "integer",
77  "EventStart" => "text",
78  "EventEnd" => "text",
79  "StartingTime" => "integer",
80  "EndingTime" => "integer",
81  "Fulltime" => "integer"
82  );
83  case "5.0.0":
84  return array(
85  "Id" => "integer",
86  "Title" => "text",
87  "Description" => "text",
88  "Location" => "text",
89  "TutorName" => "text",
90  "TutorEmail" => "text",
91  "TutorPhone" => "text",
92  "Details" => "text",
93  "Registration" => "integer",
94  "EventStart" => "text",
95  "EventEnd" => "text",
96  "StartingTime" => "integer",
97  "EndingTime" => "integer",
98  "Fulltime" => "integer",
99  "LimitedRegistration" => "integer",
100  "WaitingList" => "integer",
101  "LimitUsers" => "integer"
102  );
103  case "5.1.0":
104  return array(
105  "Id" => "integer",
106  "Title" => "text",
107  "Description" => "text",
108  "Location" => "text",
109  "TutorName" => "text",
110  "TutorEmail" => "text",
111  "TutorPhone" => "text",
112  "Details" => "text",
113  "Registration" => "integer",
114  "EventStart" => "text",
115  "EventEnd" => "text",
116  "StartingTime" => "integer",
117  "EndingTime" => "integer",
118  "Fulltime" => "integer",
119  "LimitedRegistration" => "integer",
120  "WaitingList" => "integer",
121  "AutoWait" => "integer",
122  "LimitUsers" => "integer",
123  "MinUsers" => "integer"
124  );
125  case "5.4.0":
126  return array(
127  "Id" => "integer",
128  "Title" => "text",
129  "Description" => "text",
130  "Location" => "text",
131  "TutorName" => "text",
132  "TutorEmail" => "text",
133  "TutorPhone" => "text",
134  "Details" => "text",
135  "Registration" => "integer",
136  "EventStart" => "text",
137  "EventEnd" => "text",
138  "StartingTime" => "integer",
139  "EndingTime" => "integer",
140  "Fulltime" => "integer",
141  "LimitedRegistration" => "integer",
142  "WaitingList" => "integer",
143  "AutoWait" => "integer",
144  "LimitUsers" => "integer",
145  "MinUsers" => "integer",
146  'MailMembers' => 'integer',
147  'ShowMembers' => 'integer',
148  'Type' => 'integer'
149  );
150  case "7.0":
151  case '9.0':
152  default:
153  return array(
154  "Id" => "integer",
155  "Title" => "text",
156  "Description" => "text",
157  "Location" => "text",
158  "TutorName" => "text",
159  "TutorEmail" => "text",
160  "TutorPhone" => "text",
161  "Details" => "text",
162  "Registration" => "integer",
163  "EventStart" => "text",
164  "EventEnd" => "text",
165  "StartingTime" => "integer",
166  "EndingTime" => "integer",
167  "Fulltime" => "integer",
168  "LimitedRegistration" => "integer",
169  "WaitingList" => "integer",
170  "AutoWait" => "integer",
171  "LimitUsers" => "integer",
172  "MinUsers" => "integer",
173  'MailMembers' => 'integer',
174  'ShowMembers' => 'integer',
175  'Type' => 'integer',
176  'ShowCannotPart' => 'integer',
177  'RegistrationNotificationEnabled' => 'integer',
178  'RegistrationNotificationOption' => 'text'
179  );
180  }
181  }
182 
183  if ($a_entity == "sess_item") {
184  switch ($a_version) {
185  case "4.1.0":
186  case "5.0.0":
187  case "5.1.0":
188  case "5.4.0":
189  case '7.0':
190  case '9.0':
191  default:
192  return array(
193  "SessionId" => "integer",
194  "ItemId" => "text",
195  );
196  }
197  }
198 
199  return [];
200  }

◆ getXmlNamespace()

ilSessionDataSet::getXmlNamespace ( string  $a_entity,
string  $a_schema_version 
)
protected

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

54  : string
55  {
56  if ($a_entity === 'sess_item') {
57  $a_entity = 'sess';
58  }
59  return "http://www.ilias.de/xml/Modules/Session/" . $a_entity;
60  }

◆ getXmlRecord()

ilSessionDataSet::getXmlRecord ( string  $a_entity,
string  $a_version,
array  $a_set 
)

Definition at line 294 of file class.ilSessionDataSet.php.

References ilObject\_lookupObjId().

294  : array
295  {
296  if ($a_entity == "sess") {
297  // convert server dates to utc
298  if (!$a_set["Fulltime"]) {
299  // nothing has to be done here, since the dates are already stored in UTC
300  #$start = new ilDateTime($a_set["EventStart"], IL_CAL_DATETIME);
301  #$a_set["EventStart"] = $start->get(IL_CAL_DATETIME,'','UTC');
302  #$end = new ilDateTime($a_set["EventEnd"], IL_CAL_DATETIME);
303  #$a_set["EventEnd"] = $end->get(IL_CAL_DATETIME,'','UTC');
304  }
305  }
306  if ($a_entity == "sess_item") {
307  // make ref id an object id
308  $a_set["ItemId"] = ilObject::_lookupObjId((int) ($a_set["ItemId"] ?? 0));
309  }
310  return $a_set;
311  }
static _lookupObjId(int $ref_id)
+ Here is the call graph for this function:

◆ importRecord()

ilSessionDataSet::importRecord ( string  $a_entity,
array  $a_types,
array  $a_rec,
ilImportMapping  $a_mapping,
string  $a_schema_version 
)

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

References $ref_id, ilObject\_getAllReferences(), ilEventItems\addItem(), ilImportMapping\addMapping(), applyDidacticTemplate(), ilObjectFactory\getInstanceByRefId(), ilImportMapping\getMapping(), IL_CAL_DATETIME, IL_CAL_UNIX, and ILIAS\Repository\logger().

329  : void
330  {
331  switch ($a_entity) {
332  case "sess":
333  if ($new_id = $a_mapping->getMapping('components/ILIAS/Container', 'objs', $a_rec['Id'])) {
334  $refs = ilObject::_getAllReferences((int) $new_id);
335  $newObj = ilObjectFactory::getInstanceByRefId(end($refs), false);
336  } else {
337  $this->logger->debug('Session creation without existing instance');
338  $newObj = new ilObjSession();
339  $newObj->setType("sess");
340  $newObj->create(true);
341  }
342  $newObj->setTitle((string) ($a_rec["Title"] ?? ''));
343  $newObj->setDescription((string) ($a_rec["Description"] ?? ''));
344  $newObj->setLocation((string) ($a_rec["Location"] ?? ''));
345  $newObj->setName((string) ($a_rec["TutorName"] ?? ''));
346  $newObj->setPhone((string) ($a_rec["TutorPhone"] ?? ''));
347  $newObj->setEmail((string) ($a_rec["TutorEmail"] ?? ''));
348  $newObj->setDetails((string) ($a_rec["Details"] ?? ''));
349 
350  switch ($a_schema_version) {
351  case '5.4.0':
352  case '7.0':
353  case '9.0':
354  if (isset($a_rec['MailMembers'])) {
355  $newObj->setMailToMembersType((int) $a_rec['MailMembers']);
356  }
357  if (isset($a_rec['ShowMembers'])) {
358  $newObj->setShowMembers((bool) $a_rec['ShowMembers']);
359  }
360  if (isset($a_rec['ShowCannotPart'])) {
361  $newObj->enableCannotParticipateOption((bool) $a_rec['ShowCannotPart']);
362  }
363  if (isset($a_rec['RegistrationNotificationEnabled'])) {
364  $newObj->setRegistrationNotificationEnabled((bool) $a_rec['RegistrationNotificationEnabled']);
365  }
366  if (isset($a_rec['RegistrationNotificationOption'])) {
367  $newObj->setRegistrationNotificationOption((string) $a_rec['RegistrationNotificationOption']);
368  }
369  $this->applyDidacticTemplate($newObj, (int) ($a_rec['Type'] ?? 0));
370  // no break
371  case "5.0.0":
372  case "5.1.0":
373  default:
374  $newObj->setRegistrationType((int) ($a_rec["Registration"] ?? 0));
375 
376  $newObj->enableRegistrationUserLimit((int) ($a_rec["LimitedRegistration"] ?? 0));
377  $newObj->setRegistrationMaxUsers((int) ($a_rec["LimitUsers"] ?? 0));
378  $newObj->enableRegistrationWaitingList((bool) ($a_rec["WaitingList"] ?? false));
379 
380  if (isset($a_rec["MinUsers"])) {
381  $newObj->setRegistrationMinUsers((int) ($a_rec["MinUsers"] ?? 0));
382  }
383 
384  if (isset($a_rec["AutoWait"])) {
385  $newObj->setWaitingListAutoFill((bool) ($a_rec["AutoWait"] ?? false));
386  }
387  break;
388  }
389 
390  $newObj->update(true);
391 
392  $start = new ilDateTime($a_rec["EventStart"], IL_CAL_DATETIME, "UTC");
393  $end = new ilDateTime($a_rec["EventEnd"], IL_CAL_DATETIME, "UTC");
394  $app = new ilSessionAppointment();
395  $app->setStart($start);
396  $app->setEnd($end);
397  $app->setStartingTime($start->get(IL_CAL_UNIX));
398  $app->setEndingTime($end->get(IL_CAL_UNIX));
399  $app->toggleFullTime((bool) ($a_rec["Fulltime"] ?? false));
400  $app->setSessionId($newObj->getId());
401  $app->create();
402 
403  $this->current_obj = $newObj;
404  $a_mapping->addMapping("components/ILIAS/Session", "sess", $a_rec["Id"], (string) $newObj->getId());
405  $a_mapping->addMapping('components/ILIAS/ILIASObject', 'objs', $a_rec['Id'], (string) $newObj->getId());
406  $a_mapping->addMapping('components/ILIAS/AdvancedMetaData', 'parent', $a_rec['Id'], (string) $newObj->getId());
407  $a_mapping->addMapping(
408  "components/ILIAS/MetaData",
409  "md",
410  $a_rec["Id"] . ":0:sess",
411  $newObj->getId() . ":0:sess"
412  );
413  break;
414 
415  case "sess_item":
416  if ($obj_id = $a_mapping->getMapping('components/ILIAS/Container', 'objs', $a_rec['ItemId'])) {
417  $ref_id = current(ilObject::_getAllReferences((int) $obj_id));
418  $evi = new ilEventItems($this->current_obj->getId());
419  $evi->addItem($ref_id);
420  $evi->update();
421  }
422  break;
423  }
424  }
const IL_CAL_DATETIME
applyDidacticTemplate(ilObject $rep_object, int $tpl_id)
static _getAllReferences(int $id)
get all reference ids for object ID
const IL_CAL_UNIX
addMapping(string $a_comp, string $a_entity, string $a_old_id, string $a_new_id)
$ref_id
Definition: ltiauth.php:66
getMapping(string $a_comp, string $a_entity, string $a_old_id)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
addItem(int $a_item_ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ readData()

ilSessionDataSet::readData ( string  $a_entity,
string  $a_version,
array  $a_ids 
)

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

References ilDataSet\$db, $ilDB, $q, ilDataSet\getDirectDataFromQuery(), and readDidacticTemplateType().

202  : void
203  {
204  $ilDB = $this->db;
205 
206  if ($a_entity == "sess") {
207  switch ($a_version) {
208  case "4.1.0":
209  $this->getDirectDataFromQuery($q = "SELECT ev.obj_id id, od.title title, od.description description, " .
210  " location, tutor_name, tutor_email, tutor_phone, details, registration, " .
211  " e_start event_start, e_end event_end, starting_time, ending_time, fulltime " .
212  " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) " .
213  " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) " .
214  "WHERE " .
215  $ilDB->in("ev.obj_id", $a_ids, false, "integer"));
216  break;
217  case "5.0.0":
218  $this->getDirectDataFromQuery($q = "SELECT ev.obj_id id, od.title title, odes.description description, " .
219  " location, tutor_name, tutor_email, tutor_phone, details, reg_type registration, " .
220  " reg_limited limited_registration, reg_waiting_list waiting_list, " .
221  " reg_limit_users limit_users, " .
222  " e_start event_start, e_end event_end, starting_time, ending_time, fulltime " .
223  " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) " .
224  " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) " .
225  " JOIN object_description odes ON (ev.obj_id = odes.obj_id) " .
226  "WHERE " .
227  $ilDB->in("ev.obj_id", $a_ids, false, "integer"));
228  break;
229  case "5.1.0":
230  $this->getDirectDataFromQuery($q = "SELECT ev.obj_id id, od.title title, odes.description description, " .
231  " location, tutor_name, tutor_email, tutor_phone, details, reg_type registration, " .
232  " reg_limited limited_registration, reg_waiting_list waiting_list, reg_auto_wait auto_wait, " .
233  " reg_limit_users limit_users, reg_min_users min_users, " .
234  " e_start event_start, e_end event_end, starting_time, ending_time, fulltime " .
235  " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) " .
236  " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) " .
237  " JOIN object_description odes ON (ev.obj_id = odes.obj_id) " .
238  "WHERE " .
239  $ilDB->in("ev.obj_id", $a_ids, false, "integer"));
240  break;
241  case "5.4.0":
242  $this->getDirectDataFromQuery($q = "SELECT ev.obj_id id, od.title title, odes.description description, " .
243  " location, tutor_name, tutor_email, tutor_phone, details, reg_type registration, " .
244  " reg_limited limited_registration, reg_waiting_list waiting_list, reg_auto_wait auto_wait, " .
245  " reg_limit_users limit_users, reg_min_users min_users, " .
246  " e_start event_start, e_end event_end, starting_time, ending_time, fulltime, mail_members, show_members " .
247  " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) " .
248  " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) " .
249  " JOIN object_description odes ON (ev.obj_id = odes.obj_id) " .
250  "WHERE " .
251  $ilDB->in("ev.obj_id", $a_ids, false, "integer"));
252 
253  $this->readDidacticTemplateType($a_ids);
254  break;
255  case "7.0":
256  case '9.0':
257  default:
258  $this->getDirectDataFromQuery($q = "SELECT ev.obj_id id, od.title title, odes.description description, " .
259  " location, tutor_name, tutor_email, tutor_phone, details, reg_type registration, " .
260  " reg_limited limited_registration, reg_waiting_list waiting_list, reg_auto_wait auto_wait, " .
261  " reg_limit_users limit_users, reg_min_users min_users, " .
262  " e_start event_start, e_end event_end, starting_time, ending_time, fulltime, mail_members, show_members, " .
263  " show_cannot_part, reg_notification registration_notification_enabled, " .
264  " notification_opt registration_notification_option " .
265  " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) " .
266  " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) " .
267  " JOIN object_description odes ON (ev.obj_id = odes.obj_id) " .
268  "WHERE " .
269  $ilDB->in("ev.obj_id", $a_ids, false, "integer"));
270 
271  $this->readDidacticTemplateType($a_ids);
272  break;
273  }
274  }
275 
276  if ($a_entity == "sess_item") {
277  switch ($a_version) {
278  case "4.1.0":
279  case "5.0.0":
280  case "5.1.0":
281  case '5.4.0':
282  case '7.0':
283  case '9.0':
284  default:
285  $this->getDirectDataFromQuery($q = "SELECT event_id session_id, item_id " .
286  " FROM event_items " .
287  "WHERE " .
288  $ilDB->in("event_id", $a_ids, false, "integer"));
289  break;
290  }
291  }
292  }
ilDBInterface $db
getDirectDataFromQuery(string $a_query, bool $a_convert_to_leading_upper=true, bool $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
readDidacticTemplateType(array $a_obj_ids)
$q
Definition: shib_logout.php:18
+ Here is the call graph for this function:

◆ readDidacticTemplateType()

ilSessionDataSet::readDidacticTemplateType ( array  $a_obj_ids)
protected
Parameters
int[]$a_obj_ids

Definition at line 429 of file class.ilSessionDataSet.php.

References $ref_id, ilObject\_getAllReferences(), and ilDidacticTemplateObjSettings\lookupTemplateId().

Referenced by readData().

429  : void
430  {
431  $ref_ids = [];
432  $counter = 0;
433  foreach ($a_obj_ids as $obj_id) {
434  $ref_ids = ilObject::_getAllReferences((int) $obj_id);
435  foreach ($ref_ids as $ref_id) {
436  $tpl_id = ilDidacticTemplateObjSettings::lookupTemplateId((int) $ref_id);
437  $this->data[$counter++]['Type'] = $tpl_id;
438  break;
439  }
440  }
441  }
static _getAllReferences(int $id)
get all reference ids for object ID
$ref_id
Definition: ltiauth.php:66
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTargetId()

ilSessionDataSet::setTargetId ( string  $target_id)

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

References $target_id.

43  : void
44  {
45  $this->target_id = $target_id;
46  }

Field Documentation

◆ $current_obj

ilObjSession ilSessionDataSet::$current_obj
protected

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

◆ $logger

ilLogger ilSessionDataSet::$logger
protected

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

◆ $target_id

string ilSessionDataSet::$target_id = ""
protected

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

Referenced by setTargetId().


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