ILIAS  release_8 Revision v8.24
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)
 Read data from DB. More...
 
 getXmlRecord (string $a_entity, string $a_version, array $a_set)
 Get xml record for version. More...
 
 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...
 
- 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...
 
 setExportDirectories (string $a_relative, string $a_absolute)
 
 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 ...> ... </types> <set entity="table_name"> <rec> <field_1>content</field_1> <field_2>my_date</field_2> <field_3>my_number</field_3> </rec> ... </set> </dataset> 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...
 

Protected Member Functions

 getXmlNamespace (string $a_entity, string $a_schema_version)
 
 getTypes (string $a_entity, string $a_version)
 Get (abstract) types for (abstract) field names. More...
 
 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)
 
 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
string $current_installation_id = ""
 
array $data = []
 
ilDBInterface $db
 
ilLogger $ds_log
 
string $import_directory = ""
 
string $entity = ""
 
string $schema_version = ""
 
string $relative_export_dir = ""
 
string $absolute_export_dir = ""
 
string $ds_prefix = "ds"
 
string $version = ""
 
ilSurveyImporter $import
 

Additional Inherited Members

- Data Fields inherited from ilDataSet
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 ( )

Reimplemented from ilDataSet.

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

36 {
37 global $DIC;
38
40 $this->logger = $DIC->logger()->sess();
41 }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ applyDidacticTemplate()

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

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

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

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

+ Here is the call graph for this function:

◆ getDependencies()

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

Reimplemented from ilDataSet.

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

307 : array {
308 switch ($a_entity) {
309 case "sess":
310 return array(
311 "sess_item" => array("ids" => ($a_rec["Id"] ?? ''))
312 );
313 }
314
315 return [];
316 }

◆ getSupportedVersions()

ilSessionDataSet::getSupportedVersions ( )

Reimplemented from ilDataSet.

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

48 : array
49 {
50 return ['7.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

Get (abstract) types for (abstract) field names.

Please note that the abstract fields/types only depend on the version! Not on a choosen representation!

Returns
array types array, e.g. array("field_1" => "text", "field_2" => "integer", ...)

Reimplemented from ilDataSet.

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

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

◆ getXmlNamespace()

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

Reimplemented from ilDataSet.

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

54 : string
55 {
56 return "http://www.ilias.de/xml/Modules/Session/" . $a_entity;
57 }

◆ getXmlRecord()

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

Get xml record for version.

Parameters
array$a_setabstract data record

Reimplemented from ilDataSet.

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

283 : array
284 {
285 if ($a_entity == "sess") {
286 // convert server dates to utc
287 if (!$a_set["Fulltime"]) {
288 // nothing has to be done here, since the dates are already stored in UTC
289 #$start = new ilDateTime($a_set["EventStart"], IL_CAL_DATETIME);
290 #$a_set["EventStart"] = $start->get(IL_CAL_DATETIME,'','UTC');
291 #$end = new ilDateTime($a_set["EventEnd"], IL_CAL_DATETIME);
292 #$a_set["EventEnd"] = $end->get(IL_CAL_DATETIME,'','UTC');
293 }
294 }
295 if ($a_entity == "sess_item") {
296 // make ref id an object id
297 $a_set["ItemId"] = ilObject::_lookupObjId((int) ($a_set["ItemId"] ?? 0));
298 }
299 return $a_set;
300 }
static _lookupObjId(int $ref_id)

References ilObject\_lookupObjId().

+ 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 
)

Needs to be overwritten for import use case.

Reimplemented from ilDataSet.

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

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

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

+ Here is the call graph for this function:

◆ readData()

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

Read data from DB.

This should result in the abstract field structure of the version set in the constructor.

Reimplemented from ilDataSet.

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

195 : void
196 {
198
199 if ($a_entity == "sess") {
200 switch ($a_version) {
201 case "4.1.0":
202 $this->getDirectDataFromQuery($q = "SELECT ev.obj_id id, od.title title, od.description description, " .
203 " location, tutor_name, tutor_email, tutor_phone, details, registration, " .
204 " e_start event_start, e_end event_end, starting_time, ending_time, fulltime " .
205 " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) " .
206 " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) " .
207 "WHERE " .
208 $ilDB->in("ev.obj_id", $a_ids, false, "integer"));
209 break;
210 case "5.0.0":
211 $this->getDirectDataFromQuery($q = "SELECT ev.obj_id id, od.title title, odes.description description, " .
212 " location, tutor_name, tutor_email, tutor_phone, details, reg_type registration, " .
213 " reg_limited limited_registration, reg_waiting_list waiting_list, " .
214 " reg_limit_users limit_users, " .
215 " e_start event_start, e_end event_end, starting_time, ending_time, fulltime " .
216 " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) " .
217 " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) " .
218 " JOIN object_description odes ON (ev.obj_id = odes.obj_id) " .
219 "WHERE " .
220 $ilDB->in("ev.obj_id", $a_ids, false, "integer"));
221 break;
222 case "5.1.0":
223 $this->getDirectDataFromQuery($q = "SELECT ev.obj_id id, od.title title, odes.description description, " .
224 " location, tutor_name, tutor_email, tutor_phone, details, reg_type registration, " .
225 " reg_limited limited_registration, reg_waiting_list waiting_list, reg_auto_wait auto_wait, " .
226 " reg_limit_users limit_users, reg_min_users min_users, " .
227 " e_start event_start, e_end event_end, starting_time, ending_time, fulltime " .
228 " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) " .
229 " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) " .
230 " JOIN object_description odes ON (ev.obj_id = odes.obj_id) " .
231 "WHERE " .
232 $ilDB->in("ev.obj_id", $a_ids, false, "integer"));
233 break;
234 case "5.4.0":
235 $this->getDirectDataFromQuery($q = "SELECT ev.obj_id id, od.title title, odes.description description, " .
236 " location, tutor_name, tutor_email, tutor_phone, details, reg_type registration, " .
237 " reg_limited limited_registration, reg_waiting_list waiting_list, reg_auto_wait auto_wait, " .
238 " reg_limit_users limit_users, reg_min_users min_users, " .
239 " e_start event_start, e_end event_end, starting_time, ending_time, fulltime, mail_members, show_members " .
240 " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) " .
241 " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) " .
242 " JOIN object_description odes ON (ev.obj_id = odes.obj_id) " .
243 "WHERE " .
244 $ilDB->in("ev.obj_id", $a_ids, false, "integer"));
245
246 $this->readDidacticTemplateType($a_ids);
247 break;
248 case "7.0":
249 $this->getDirectDataFromQuery($q = "SELECT ev.obj_id id, od.title title, odes.description description, " .
250 " location, tutor_name, tutor_email, tutor_phone, details, reg_type registration, " .
251 " reg_limited limited_registration, reg_waiting_list waiting_list, reg_auto_wait auto_wait, " .
252 " reg_limit_users limit_users, reg_min_users min_users, " .
253 " e_start event_start, e_end event_end, starting_time, ending_time, fulltime, mail_members, show_members, " .
254 " show_cannot_part, reg_notification registration_notification_enabled, " .
255 " notification_opt registration_notification_option " .
256 " FROM event ev JOIN object_data od ON (ev.obj_id = od.obj_id) " .
257 " JOIN event_appointment ea ON (ev.obj_id = ea.event_id) " .
258 " JOIN object_description odes ON (ev.obj_id = odes.obj_id) " .
259 "WHERE " .
260 $ilDB->in("ev.obj_id", $a_ids, false, "integer"));
261
262 $this->readDidacticTemplateType($a_ids);
263 break;
264 }
265 }
266
267 if ($a_entity == "sess_item") {
268 switch ($a_version) {
269 case "4.1.0":
270 case "5.0.0":
271 case "5.1.0":
272 case '5.4.0':
273 case '7.0':
274 $this->getDirectDataFromQuery($q = "SELECT event_id session_id, item_id " .
275 " FROM event_items " .
276 "WHERE " .
277 $ilDB->in("event_id", $a_ids, false, "integer"));
278 break;
279 }
280 }
281 }
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 ...
ilDBInterface $db
readDidacticTemplateType(array $a_obj_ids)

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

+ Here is the call graph for this function:

◆ readDidacticTemplateType()

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

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

430 : void
431 {
432 $ref_ids = [];
433 $counter = 0;
434 foreach ($a_obj_ids as $obj_id) {
435 $ref_ids = ilObject::_getAllReferences((int) $obj_id);
436 foreach ($ref_ids as $ref_id) {
438 $this->data[$counter++]['Type'] = $tpl_id;
439 break;
440 }
441 }
442 }

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

Referenced by readData().

+ 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.

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

References $target_id.

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: