/** * get strong presentation of participants * @param * @return */ public function participantsToString() { include_once './Services/WebServices/ECS/classes/class.ilECSUtils.php'; $part_string = ""; $part = explode(',', $this->getMappingValue()); $counter = 0; foreach ($part as $part_id) { if ($counter++) { $part_string .= ', '; } $part_string .= '"'; if ($name = ilECSUtils::lookupParticipantName($part_id)) { $part_string .= $name; } else { $part_string .= $part_id; } $part_string .= '"'; } return $part_string; }
/** * update remote object settings from ecs content * * @param ilECSSetting $a_server * @param object $a_ecs_content object with object settings * @param int $a_owner */ public function updateFromECSContent(ilECSSetting $a_server, $a_ecs_content, $a_owner) { global $ilLog; $ilLog->write('updateFromECSContent: ' . print_r($a_ecs_content, true)); // Get organisation for owner (ObjectListGUI performance) $organisation = null; if ($a_owner) { include_once './Services/WebServices/ECS/classes/class.ilECSUtils.php'; $organisation = ilECSUtils::lookupParticipantName($a_owner, $a_server->getServerId()); $ilLog->write('found organisation: ' . $organisation); } $this->setMID($a_owner); // obsolete? $this->setOrganization($organisation); $this->setTitle($a_ecs_content->title); $this->setDescription($a_ecs_content->abstract); $this->setRemoteLink($a_ecs_content->url); $ilLog->write('updateCustomFromECSContent'); $this->updateCustomFromECSContent($a_server, $a_ecs_content); // we are updating late so custom values can be set $ilLog->write('ilObject->update()'); $this->update(); include_once './Services/WebServices/ECS/classes/class.ilECSUtils.php'; $matchable_content = ilECSUtils::getMatchableContent($this->getECSObjectType(), $a_server->getServerId(), $a_ecs_content, $a_owner); // rule-based category mapping include_once './Services/WebServices/ECS/classes/class.ilECSCategoryMapping.php'; ilECSCategoryMapping::handleUpdate($this->getId(), $a_server->getServerId(), $matchable_content); }