60 include_once(
'Services/WebServices/ECS/classes/class.ilECSSetting.php');
61 include_once(
'Services/WebServices/ECS/classes/class.ilECSConnector.php');
62 include_once(
'Services/WebServices/ECS/classes/class.ilECSConnectorException.php');
63 include_once(
'Services/WebServices/ECS/classes/class.ilECSCommunity.php');
67 $this->settings = $setting;
71 $GLOBALS[
'ilLog']->write(__METHOD__.
': Using deprecated call');
89 $GLOBALS[
'ilLog']->write(__METHOD__.
': Using deprecated call');
100 if(isset(self::$instances[$a_server_id]))
102 return self::$instances[$a_server_id];
125 return $this->own_ids ? $this->own_ids : array();
137 return $this->communities ? $this->communities : array();
149 foreach($this->communities as $community)
151 if($community->getId() == $a_id)
167 return isset($this->participants[$a_mid]) ? $this->participants[$a_mid] :
false;
177 foreach($this->communities as $community)
179 foreach($community->getParticipants() as $part)
181 if($part->getMID() == $a_mid)
200 foreach($community->getParticipants() as $participant)
202 if($participant->isPublishable())
204 $p_part[] = $participant;
208 return $p_part ? $p_part : array();
219 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';
221 $en = $ps->getEnabledParticipants();
224 foreach($community->getParticipants() as $participant)
226 if(in_array($participant->getMid(), $en))
228 $e_part[] = $participant;
232 return $e_part ? $e_part : array();
247 $res = $this->connector->getMemberships();
248 if(!is_array(
$res->getResult()))
252 foreach(
$res->getResult() as $community)
255 foreach($tmp_comm->getParticipants() as $participant)
257 $this->participants[$participant->getMID()] = $participant;
258 if($participant->isSelf())
260 $this->own_ids[] = $participant->getMID();
263 $this->communities[] = $tmp_comm;
268 $ilLog->write(__METHOD__.
': Error connecting to ECS server. '.$e->getMessage());