ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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...
 
 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 ...> ... </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...
 
 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)
 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)
 
 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 28 of file class.ilSessionDataSet.php.

Constructor & Destructor Documentation

◆ __construct()

ilSessionDataSet::__construct ( )

Reimplemented from ilDataSet.

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

35 {
36 global $DIC;
37
39 $this->logger = $DIC->logger()->sess();
40 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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 442 of file class.ilSessionDataSet.php.

442 : void
443 {
444 $this->logger->debug('Apply didactic template');
445
446 if ($tpl_id == 0) {
447 $this->logger->debug('Default permissions');
448 // Default template
449 return;
450 }
451
452 $templates = ilDidacticTemplateSettings::getInstanceByObjectType('sess')->getTemplates();
453 foreach ($templates as $template) {
454 if ($template->isAutoGenerated()) {
455 $this->logger->debug('Apply first auto generated');
456 $rep_object->applyDidacticTemplate($template->getId());
457 }
458 }
459 }
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 312 of file class.ilSessionDataSet.php.

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

◆ getSupportedVersions()

ilSessionDataSet::getSupportedVersions ( )

Reimplemented from ilDataSet.

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

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

◆ 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 61 of file class.ilSessionDataSet.php.

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

◆ getXmlNamespace()

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

Reimplemented from ilDataSet.

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

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

◆ 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 293 of file class.ilSessionDataSet.php.

293 : array
294 {
295 if ($a_entity == "sess") {
296 // convert server dates to utc
297 if (!$a_set["Fulltime"]) {
298 // nothing has to be done here, since the dates are already stored in UTC
299 #$start = new ilDateTime($a_set["EventStart"], IL_CAL_DATETIME);
300 #$a_set["EventStart"] = $start->get(IL_CAL_DATETIME,'','UTC');
301 #$end = new ilDateTime($a_set["EventEnd"], IL_CAL_DATETIME);
302 #$a_set["EventEnd"] = $end->get(IL_CAL_DATETIME,'','UTC');
303 }
304 }
305 if ($a_entity == "sess_item") {
306 // make ref id an object id
307 $a_set["ItemId"] = ilObject::_lookupObjId((int) ($a_set["ItemId"] ?? 0));
308 }
309 return $a_set;
310 }
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 328 of file class.ilSessionDataSet.php.

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

References $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 201 of file class.ilSessionDataSet.php.

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

References ilDataSet\$db, $ilDB, $q, 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 428 of file class.ilSessionDataSet.php.

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

References $counter, $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 42 of file class.ilSessionDataSet.php.

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

References $target_id.

Field Documentation

◆ $current_obj

ilObjSession ilSessionDataSet::$current_obj
protected

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

◆ $logger

ilLogger ilSessionDataSet::$logger
protected

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

◆ $target_id

string ilSessionDataSet::$target_id = ""
protected

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

Referenced by setTargetId().


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