/** * @param $sco_id * @return array */ public function getContentIconAttribute($sco_id) { $session = $this->xmlApi->getBreezeSession(); $icons = array(); if ($session != NULL && $this->xmlApi->login($this->adminLogin, $this->adminPass, $session)) { $icons[] = $this->xmlApi->getContentIconAttribute($sco_id, $this->sco_id, $session); } return $icons; }
/** * Gets meeting or content URL * * With SWITCHaai it's not possible to get the meeting url by folder_id! Because we have no permissions to do this! * * @param String $sco_id Meeting or content id * @param String $folder_id Parent folder id * @param String $session Session id * @param String $type Used for SWITCHaai meeting|content|... * @return String Meeting or content URL, or NULL if something is wrong */ public function getURL($sco_id, $folder_id, $session, $type) { global $ilLog; switch ($type) { case 'meeting': $url = $this->getApiUrl(array('action' => 'report-my-meetings', 'session' => $session)); $xml = $this->getCachedSessionCall($url); if ($xml->status['code'] == "ok") { foreach ($xml->{'my-meetings'}->meeting as $meeting) { if ($meeting['sco-id'] == $sco_id) { return (string) $meeting->{'url-path'}; } } } $ilLog->write('AdobeConnect getURL Request: ' . $url); $ilLog->write('AdobeConnect getURL Response: ' . $xml->asXML()); return NULL; break; default: return parent::getURL($sco_id, $folder_id, $session); break; } }
private function usePasswordAuthentification($user) { /** * @var $ilUser ilObjUser * @var $ilLog ilLog */ global $ilUser, $ilLog; // Try ro read the adobe connect password if (!($pwd = $ilUser->getPref('xavc_pwd'))) { if ($this->changeUserPassword($user, $pwd = md5(uniqid(microtime(), true)))) { $ilUser->setPref('xavc_pwd', $pwd); $ilUser->writePrefs(); } else { $ilLog->write("Adobe Connect " . __METHOD__ . ": No password found in user preferences (Id: " . $ilUser->getId() . " | " . $ilUser->getLogin() . "). Could not change password for user '{$user}' on Adobe Connect server."); return NULL; } } self::$breeze_session = null; $session = $this->getBreezeSession(); if ($this->login($user, $pwd, $session)) { return $session; } else { if ($this->changeUserPassword($user, $pwd = md5(uniqid(microtime(), true)))) { $ilUser->setPref('xavc_pwd', $pwd); $ilUser->writePrefs(); if ($this->login($user, $pwd, $session)) { return $session; } else { $ilLog->write("Adobe Connect " . __METHOD__ . ": Second login attempt not permitted (Id: " . $ilUser->getId() . " | " . $ilUser->getLogin() . "). Password changed for user '{$user}' on Adobe Connect server."); } } else { $ilLog->write("Adobe Connect " . __METHOD__ . ": Login not permitted (Id: " . $ilUser->getId() . " | " . $ilUser->getLogin() . "). Could not change password for user '{$user}' on Adobe Connect server."); } return NULL; } }