|
| __construct () |
|
| getSupportedVersions () |
|
| getXmlRecord (string $a_entity, string $a_version, array $a_set) |
|
| afterXmlRecordWriting (string $a_entity, string $a_version, array $a_set) |
|
| readData (string $a_entity, string $a_version, array $a_ids) |
|
| 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...
|
|
| 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) |
|
|
| getXmlNamespace (string $a_entity, string $a_schema_version) |
|
| getTypes (string $a_entity, string $a_version) |
|
| 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=[]) |
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning
- Author
- Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Definition at line 22 of file class.ilUserDataSet.php.
ilUserDataSet::importRecord |
( |
string |
$a_entity, |
|
|
array |
$a_types, |
|
|
array |
$a_rec, |
|
|
ilImportMapping |
$a_mapping, |
|
|
string |
$a_schema_version |
|
) |
| |
Definition at line 293 of file class.ilUserDataSet.php.
References $DIC, Vendor\Package\$f, $ilSetting, ilObject\_lookupType(), ilObjUser\_uploadPersonalPicture(), ilImportMapping\addMapping(), ilDataSet\convertToLeadingUpper(), ilDataSet\getImportDirectory(), ilImportMapping\getMapping(), ILIAS\Repository\int(), null, and ilUtil\secureString().
303 $ilUser = $DIC[
'ilUser'];
309 $a_mapping->
addMapping(
"components/ILIAS/User",
"usr", $a_rec[
"Id"], $ilUser->getId());
313 $usr_id = $a_mapping->
getMapping(
"components/ILIAS/User",
"usr", $a_rec[
"Id"]);
315 if (!isset($this->users[$usr_id])) {
316 $this->users[$usr_id] =
new ilObjUser($usr_id);
318 $user = $this->users[$usr_id];
320 $prof->skipField(
"username");
321 $prof->skipField(
"password");
322 $prof->skipField(
"roles");
323 $prof->skipGroup(
"settings");
324 $fields = $prof->getStandardFields();
325 foreach ($fields as $k =>
$f) {
328 if ($this->user_profile->userSettingVisible($k) &&
329 !
$ilSetting->get(
"usr_settings_disable_" . $k) &&
330 (
$f[
"method"] ??
"") !=
"" && isset($a_rec[$up_k])) {
331 $set_method =
"set" . substr(
$f[
"method"], 3);
336 $user->setLatitude($a_rec[
"Latitude"] ??
null);
337 $user->setLongitude($a_rec[
"Longitude"] ?? null);
338 $zoom = isset($a_rec[
"LocZoom"]) ? (
int) $a_rec[
"LocZoom"] : null;
339 $user->setLocationZoom($zoom);
344 $pic_dir = $this->
getImportDirectory() .
"/" . str_replace(
"..",
"", $a_rec[
"Picture"]);
345 if ($pic_dir !=
"" && is_dir($pic_dir)) {
346 $upload_file = $pic_dir .
"/usr_" . $a_rec[
"Id"] .
".jpg";
347 if (!is_file($upload_file)) {
348 $upload_file = $pic_dir .
"/upload_" . $a_rec[
"Id"] .
"pic";
350 if (is_file($upload_file)) {
358 $usr_id = $a_mapping->
getMapping(
"components/ILIAS/User",
"usr", $a_rec[
"UserId"]);
360 if (!isset($this->users[$usr_id])) {
361 $this->users[$usr_id] =
new ilObjUser($usr_id);
363 $user = $this->users[$usr_id];
369 $usr_id = $a_mapping->
getMapping(
"components/ILIAS/User",
"usr", $a_rec[
"UserId"]);
convertToLeadingUpper(string $a_str)
Make xyz_abc a XyzAbc string.
static secureString(string $a_str, bool $a_strip_html=true, string $a_allow="")
addMapping(string $a_comp, string $a_entity, string $a_old_id, string $a_new_id)
static _uploadPersonalPicture(string $tmp_file, int $obj_id)
Create a personal picture image file from a temporary image file.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getMapping(string $a_comp, string $a_entity, string $a_old_id)
static _lookupType(int $id, bool $reference=false)