|
| __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) |
|
| __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 ...> ... 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...
|
|
|
| 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) |
|
| 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=[]) |
|
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.
ilSessionDataSet::importRecord |
( |
string |
$a_entity, |
|
|
array |
$a_types, |
|
|
array |
$a_rec, |
|
|
ilImportMapping |
$a_mapping, |
|
|
string |
$a_schema_version |
|
) |
| |
Definition at line 318 of file class.ilSessionDataSet.php.
References $app, $ref_id, ilObject\_getAllReferences(), ilEventItems\addItem(), ilImportMapping\addMapping(), applyDidacticTemplate(), ilObjectFactory\getInstanceByRefId(), ilImportMapping\getMapping(), IL_CAL_DATETIME, IL_CAL_UNIX, and ILIAS\Repository\logger().
322 if ($new_id = $a_mapping->
getMapping(
'Services/Container',
'objs', $a_rec[
'Id'])) {
326 $this->
logger->debug(
'Session creation without existing instance');
328 $newObj->setType(
"sess");
329 $newObj->create(
true);
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"] ??
''));
339 switch ($a_schema_version) {
342 if (isset($a_rec[
'MailMembers'])) {
343 $newObj->setMailToMembersType((
int) $a_rec[
'MailMembers']);
345 if (isset($a_rec[
'ShowMembers'])) {
346 $newObj->setShowMembers((
bool) $a_rec[
'ShowMembers']);
348 if (isset($a_rec[
'ShowCannotPart'])) {
349 $newObj->enableCannotParticipateOption((
bool) $a_rec[
'ShowCannotPart']);
351 if (isset($a_rec[
'RegistrationNotificationEnabled'])) {
352 $newObj->setRegistrationNotificationEnabled((
bool) $a_rec[
'RegistrationNotificationEnabled']);
354 if (isset($a_rec[
'RegistrationNotificationOption'])) {
355 $newObj->setRegistrationNotificationOption((
string) $a_rec[
'RegistrationNotificationOption']);
361 $newObj->setRegistrationType((
int) ($a_rec[
"Registration"] ?? 0));
363 $newObj->enableRegistrationUserLimit((
int) ($a_rec[
"LimitedRegistration"] ?? 0));
364 $newObj->setRegistrationMaxUsers((
int) ($a_rec[
"LimitUsers"] ?? 0));
365 $newObj->enableRegistrationWaitingList((
bool) ($a_rec[
"WaitingList"] ??
false));
367 if (isset($a_rec[
"MinUsers"])) {
368 $newObj->setRegistrationMinUsers((
int) ($a_rec[
"MinUsers"] ?? 0));
371 if (isset($a_rec[
"AutoWait"])) {
372 $newObj->setWaitingListAutoFill((
bool) ($a_rec[
"AutoWait"] ??
false));
377 if (isset($a_rec[
'MailMembers'])) {
378 $newObj->setMailToMembersType((
int) ($a_rec[
'MailMembers'] ?? 0));
380 if (isset($a_rec[
'ShowMembers'])) {
381 $newObj->setShowMembers((
bool) ($a_rec[
'ShowMembers'] ??
false));
383 if (isset($a_rec[
'ShowCannotPart'])) {
384 $newObj->enableCannotParticipateOption((
bool) ($a_rec[
'show_cannot_part'] ??
false));
391 $newObj->update(
true);
396 $app->setStart($start);
400 $app->toggleFullTime((
bool) ($a_rec[
"Fulltime"] ??
false));
401 $app->setSessionId($newObj->getId());
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());
411 $a_rec[
"Id"] .
":0:sess",
412 $newObj->getId() .
":0:sess" 417 if ($obj_id = $a_mapping->
getMapping(
'Services/Container',
'objs', $a_rec[
'ItemId'])) {
applyDidacticTemplate(ilObject $rep_object, int $tpl_id)
static _getAllReferences(int $id)
get all reference ids for object ID
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
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...