/**
  * @param integer $ref_id ref_id of ilias ac-object
  * @param integer $sco_id
  * @param array   $member_ids
  */
 public function addCrsGrpMembers($ref_id, $sco_id, $member_ids = null)
 {
     $oParticipants = $this->getParticipantsObject();
     if (count($oParticipants->getParticipants()) == 0) {
         return;
     }
     $role_map = ilAdobeConnectServer::getRoleMap();
     /** @var $oParticipants  ilGroupParticipants | ilCourseParticipants */
     $admins = $oParticipants->getAdmins();
     $tutors = $oParticipants->getTutors();
     $members = $oParticipants->getMembers();
     if (is_array($member_ids) && count($member_ids) > 0) {
         $all_participants = $member_ids;
         $admins = array_uintersect($member_ids, $admins, 'strcmp');
         $tutors = array_uintersect($member_ids, $tutors, 'strcmp');
         $members = array_uintersect($member_ids, $members, 'strcmp');
     } else {
         $all_participants = array_unique(array_merge($admins, $tutors, $members));
     }
     $this->pluginObj->includeClass('class.ilAdobeConnectRoles.php');
     $xavcRoles = new ilAdobeConnectRoles($ref_id);
     if (ilAdobeConnectServer::getSetting('user_assignment_mode') != ilAdobeConnectServer::ASSIGN_USER_SWITCH) {
         foreach ($all_participants as $user_id) {
             $this->pluginObj->includeClass('class.ilAdobeConnectUserUtil.php');
             //check if there is an adobe connect account at the ac-server
             $ilAdobeConnectUser = new ilAdobeConnectUserUtil($user_id);
             $ilAdobeConnectUser->ensureAccountExistance();
             // add to desktop
             if (ilAdobeConnectServer::getSetting('add_to_desktop') == 1) {
                 ilObjUser::_addDesktopItem($user_id, $ref_id, 'xavc');
             }
         }
     }
     // receive breeze session
     $session = $this->xmlApi->getBreezeSession();
     $this->pluginObj->includeClass('class.ilXAVCMembers.php');
     if ($session != NULL && $this->xmlApi->login($this->adminLogin, $this->adminPass, $session)) {
         foreach ($admins as $user_id) {
             if ($user_id == $this->getOwner()) {
                 continue;
             }
             $xavcRoles->addAdministratorRole($user_id);
             $is_member = ilXAVCMembers::_isMember($user_id, $ref_id);
             // local member table
             $xavcMemberObj = new ilXAVCMembers($ref_id, $user_id);
             $status = $role_map[$oParticipants->getType() . '_admin'];
             $xavcMemberObj->setStatus($status);
             $xavcMemberObj->setScoId($sco_id);
             if ($is_member) {
                 $xavcMemberObj->updateXAVCMember();
             } else {
                 $xavcMemberObj->insertXAVCMember();
             }
             $this->xmlApi->updateMeetingParticipant($sco_id, ilXAVCMembers::_lookupXAVCLogin($user_id), $session, $status);
         }
         foreach ($tutors as $user_id) {
             if ($user_id == $this->getOwner()) {
                 continue;
             }
             $xavcRoles->addAdministratorRole($user_id);
             $is_member = ilXAVCMembers::_isMember($user_id, $ref_id);
             // local member table
             $xavcMemberObj = new ilXAVCMembers($ref_id, $user_id);
             $status = $role_map[$oParticipants->getType() . '_tutor'];
             $xavcMemberObj->setStatus($status);
             $xavcMemberObj->setScoId($sco_id);
             if ($is_member) {
                 $xavcMemberObj->updateXAVCMember();
             } else {
                 $xavcMemberObj->insertXAVCMember();
             }
             $this->xmlApi->updateMeetingParticipant($sco_id, ilXAVCMembers::_lookupXAVCLogin($user_id), $session, $status);
         }
         foreach ($members as $user_id) {
             if ($user_id == $this->getOwner()) {
                 continue;
             }
             $xavcRoles->addMemberRole($user_id);
             $is_member = ilXAVCMembers::_isMember($user_id, $ref_id);
             // local member table
             $xavcMemberObj = new ilXAVCMembers($ref_id, $user_id);
             $status = $role_map[$oParticipants->getType() . '_member'];
             $xavcMemberObj->setStatus($status);
             $xavcMemberObj->setScoId($sco_id);
             if ($is_member) {
                 $xavcMemberObj->updateXAVCMember();
             } else {
                 $xavcMemberObj->insertXAVCMember();
             }
             $this->xmlApi->updateMeetingParticipant($sco_id, ilXAVCMembers::_lookupXAVCLogin($user_id), $session, $status);
         }
         $owner_id = ilObject::_lookupOwner($oParticipants->getObjId());
         $xavcRoles->addAdministratorRole($owner_id);
         $is_member = ilXAVCMembers::_isMember($owner_id, $ref_id);
         // local member table
         $xavcMemberObj = new ilXAVCMembers($ref_id, $owner_id);
         $status = $role_map[$oParticipants->getType() . '_owner'];
         $xavcMemberObj->setStatus($status);
         $xavcMemberObj->setScoId($sco_id);
         if ($is_member) {
             $xavcMemberObj->updateXAVCMember();
         } else {
             $xavcMemberObj->insertXAVCMember();
         }
         $this->xmlApi->updateMeetingParticipant($sco_id, ilXAVCMembers::_lookupXAVCLogin($owner_id), $session, $status);
     }
 }
 /**
  * @param integer $ref_id ref_id of ilias ac-object
  * @param integer $sco_id
  * @param array   $member_ids
  */
 public function addCrsGrpMembers($ref_id, $sco_id, $member_ids = null)
 {
     global $tree;
     $parent_crs_ref = $tree->checkForParentType($ref_id, 'crs');
     $parent_grp_ref = $tree->checkForParentType($ref_id, 'grp');
     $type = null;
     $obj_id = 0;
     if ($parent_crs_ref && empty($parent_grp_ref)) {
         $obj_id = ilObject::_lookupObjectId($parent_crs_ref);
         include_once 'Modules/Course/classes/class.ilCourseParticipants.php';
         $oParticipants = ilCourseParticipants::_getInstanceByObjId($obj_id);
         $type = 'crs';
     } else {
         if ($parent_grp_ref) {
             $obj_id = ilObject::_lookupObjectId($parent_grp_ref);
             include_once 'Modules/Group/classes/class.ilGroupParticipants.php';
             $oParticipants = ilGroupParticipants::_getInstanceByObjId($obj_id);
             $type = 'grp';
         }
     }
     if ($type == 'crs' || $type == 'grp') {
         $role_map = ilAdobeConnectServer::getRoleMap();
         $owner_id = ilObject::_lookupOwner(ilObject::_lookupObjectId($ref_id));
         /** @var $oParticipants  ilGroupParticipants | ilCourseParticipants */
         $admins = $oParticipants->getAdmins();
         $tutors = $oParticipants->getTutors();
         $members = $oParticipants->getMembers();
         if (is_array($member_ids) && count($member_ids) > 0) {
             $all_participants = $member_ids;
             $admins = array_uintersect($member_ids, $admins, 'strcmp');
             $tutors = array_uintersect($member_ids, $tutors, 'strcmp');
             $members = array_uintersect($member_ids, $members, 'strcmp');
         } else {
             $all_participants = array_unique(array_merge($admins, $tutors, $members));
         }
         $this->pluginObj->includeClass('class.ilAdobeConnectRoles.php');
         $xavcRoles = new ilAdobeConnectRoles($ref_id);
         if (ilAdobeConnectServer::getSetting('user_assignment_mode') != ilAdobeConnectServer::ASSIGN_USER_SWITCH) {
             foreach ($all_participants as $user_id) {
                 $this->pluginObj->includeClass('class.ilAdobeConnectUserUtil.php');
                 //check if there is an adobe connect account at the ac-server
                 $ilAdobeConnectUser = new ilAdobeConnectUserUtil($user_id);
                 $ilAdobeConnectUser->ensureAccountExistance();
                 // add to desktop
                 if (ilAdobeConnectServer::getSetting('add_to_desktop') == 1) {
                     ilObjUser::_addDesktopItem($user_id, $ref_id, 'xavc');
                 }
             }
         }
         // receive breeze session
         $session = self::getSession();
         $this->pluginObj->includeClass('class.ilXAVCMembers.php');
         if ($session != NULL && $this->xmlApi->login($this->adminLogin, $this->adminPass, $session)) {
             foreach ($admins as $user_id) {
                 $xavcRoles->addAdministratorRole($user_id);
                 $is_member = ilXAVCMembers::_isMember($user_id, $ref_id);
                 // local member table
                 $xavcMemberObj = new ilXAVCMembers($ref_id, $user_id);
                 $status = $role_map[$type . '_admin'];
                 $xavcMemberObj->setStatus($status);
                 $xavcMemberObj->setScoId($sco_id);
                 if ($is_member) {
                     $xavcMemberObj->updateXAVCMember();
                 } else {
                     $xavcMemberObj->insertXAVCMember();
                 }
                 $xavc_login = ilXAVCMembers::_lookupXAVCLogin($user_id);
                 if (!empty($xavc_login)) {
                     $this->xmlApi->updateMeetingParticipant($sco_id, $xavc_login, $session, $status);
                 }
             }
             foreach ($tutors as $user_id) {
                 if (($xavc_login = ilXAVCMembers::_lookupXAVCLogin($user_id)) != $this->adminLogin && $user_id != $owner_id) {
                     $xavcRoles->addAdministratorRole($user_id);
                     $is_member = ilXAVCMembers::_isMember($user_id, $ref_id);
                     // local member table
                     $xavcMemberObj = new ilXAVCMembers($ref_id, $user_id);
                     $status = $role_map[$type . '_tutor'];
                     $xavcMemberObj->setStatus($status);
                     $xavcMemberObj->setScoId($sco_id);
                     if ($is_member) {
                         $xavcMemberObj->updateXAVCMember();
                     } else {
                         $xavcMemberObj->insertXAVCMember();
                     }
                     if (!empty($xavc_login)) {
                         $this->xmlApi->updateMeetingParticipant($sco_id, $xavc_login, $session, $status);
                     }
                 }
             }
             foreach ($members as $user_id) {
                 if (($xavc_login = ilXAVCMembers::_lookupXAVCLogin($user_id)) != $this->adminLogin && $user_id != $owner_id) {
                     $xavcRoles->addMemberRole($user_id);
                     $is_member = ilXAVCMembers::_isMember($user_id, $ref_id);
                     // local member table
                     $xavcMemberObj = new ilXAVCMembers($ref_id, $user_id);
                     $status = $role_map[$type . '_member'];
                     $xavcMemberObj->setStatus($status);
                     $xavcMemberObj->setScoId($sco_id);
                     if ($is_member) {
                         $xavcMemberObj->updateXAVCMember();
                     } else {
                         $xavcMemberObj->insertXAVCMember();
                     }
                     if (!empty($xavc_login)) {
                         $this->xmlApi->updateMeetingParticipant($sco_id, $xavc_login, $session, $status);
                     }
                 }
             }
             $xavcRoles->addAdministratorRole($owner_id);
             // local member table
             $xavcMemberObj = new ilXAVCMembers($ref_id, $owner_id);
             $status = $role_map[$type . '_owner'];
             $xavcMemberObj->setStatus($status);
             $xavcMemberObj->setScoId($sco_id);
             $is_member = ilXAVCMembers::_isMember($owner_id, $ref_id);
             if ($is_member) {
                 $xavcMemberObj->updateXAVCMember();
             } else {
                 $xavcMemberObj->insertXAVCMember();
             }
             $this->xmlApi->updateMeetingParticipant($sco_id, ilXAVCMembers::_lookupXAVCLogin($owner_id), $session, $status);
         }
     }
 }
 public function showContent()
 {
     /*
      * var $ilUser ilUser
      */
     global $ilUser, $tpl, $ilAccess;
     $this->pluginObj->includeClass('class.ilAdobeConnectUserUtil.php');
     $this->pluginObj->includeClass('class.ilAdobeConnectServer.php');
     $has_write_permission = $ilAccess->checkAccess("write", "", $this->object->getRefId());
     $settings = ilAdobeConnectServer::_getInstance();
     if ($settings->getAuthMode() == ilAdobeConnectServer::AUTH_MODE_SWITCHAAI and ilAdobeConnectServer::useSwitchaaiAuthMode($ilUser->getAuthMode(true))) {
         //Login User - this creates a user if he not exists.
         $ilAdobeConnectUser = new ilAdobeConnectUserUtil($this->user->getId());
         $ilAdobeConnectUser->loginUser();
         //Add the user as Participant @adobe switch
         $status = ilXAVCMembers::_lookupStatus($ilUser->getId(), $this->object->getRefId());
         $this->object->addSwitchParticipant($ilUser->getEmail(), $status);
     }
     $this->tabs->setTabActive('contents');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->removeFormAction();
     $this->pluginObj->includeClass('class.ilAdobeConnectQuota.php');
     $this->pluginObj->includeClass("class.ilObjAdobeConnectAccess.php");
     $is_member = ilObjAdobeConnectAccess::_hasMemberRole($ilUser->getId(), $this->object->getRefId());
     $is_admin = ilObjAdobeConnectAccess::_hasAdminRole($ilUser->getId(), $this->object->getRefId());
     //SWITCHAAI: If the user has no SWITCHaai-Account, we show the room link without connecting to the adobe-connect server. This is used for guest logins.
     $show_only_roomlink = false;
     if ($settings->getAuthMode() == ilAdobeConnectServer::AUTH_MODE_SWITCHAAI and !ilAdobeConnectServer::useSwitchaaiAuthMode($ilUser->getAuthMode(true))) {
         $show_only_roomlink = true;
         $presentation_url = $settings->getPresentationUrl();
         $button_txt = $this->pluginObj->txt('enter_vc');
         $button_target = $presentation_url . $this->object->getURL();
         $button_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.bigbutton.html", true, true);
         $button_tpl->setVariable('BUTTON_TARGET', $button_target);
         $button_tpl->setVariable('BUTTON_TEXT', $button_txt);
         $big_button = $button_tpl->get();
         $info->addSection('');
         $info->addProperty('', $big_button . "<br />");
     }
     if (($this->access->checkAccess("write", "", $this->object->getRefId()) || $is_member || $is_admin) && !$show_only_roomlink) {
         $presentation_url = $settings->getPresentationUrl();
         $form = new ilPropertyFormGUI();
         $form->setTitle($this->pluginObj->txt('access_meeting_title'));
         $this->object->doRead();
         if ($this->object->getStartDate() != NULL) {
             $ilAdobeConnectUser = new ilAdobeConnectUserUtil($this->user->getId());
             $ilAdobeConnectUser->ensureAccountExistance();
             $xavc_login = $ilAdobeConnectUser->getXAVCLogin();
             $quota = new ilAdobeConnectQuota();
             // show button
             if (($this->object->getPermanentRoom() == 1 || $this->doProvideAccessLink()) && $this->object->isParticipant($xavc_login)) {
                 if (!$quota->mayStartScheduledMeeting($this->object->getScoId())) {
                     $href = $this->txt("meeting_not_available_no_slots");
                     $button_disabled = true;
                 } else {
                     $href = '<a href="' . $this->ctrl->getLinkTarget($this, 'performSso') . '" target="_blank" >' . $presentation_url . $this->object->getURL() . '</a>';
                     $button_disabled = false;
                 }
             } else {
                 $href = $this->txt("meeting_not_available");
                 $button_disabled = true;
             }
             if ($button_disabled == true) {
                 $button_txt = $href;
             } else {
                 $button_txt = $this->pluginObj->txt('enter_vc');
             }
             $button_target = ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget($this, 'performSso', '', false, false);
             $button_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.bigbutton.html", true, true);
             $button_tpl->setVariable('BUTTON_TARGET', $button_target);
             $button_tpl->setVariable('BUTTON_TEXT', $button_txt);
             $big_button = $button_tpl->get();
             $info->addSection('');
             if ($button_disabled == true) {
                 $info->addProperty('', $href);
             } else {
                 $info->addProperty('', $big_button . "<br />");
             }
             // show instructions
             if (strlen($this->object->getInstructions()) > 1) {
                 $info->addSection($this->lng->txt('exc_instruction'));
                 $info->addProperty('', nl2br($this->object->getInstructions()));
             }
             // show contact info
             if (strlen($this->object->getContactInfo()) > 1) {
                 $info->addSection($this->pluginObj->txt('contact_information'));
                 $info->addProperty('', nl2br($this->object->getContactInfo()));
             }
             //show contents
             if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_CONTENTS) && $this->object->getReadContents('content')) {
                 $info->addSection($this->pluginObj->txt('file_uploads'));
                 $info->setFormAction($this->ctrl->getFormAction($this, 'showContent'));
                 $has_access = false;
                 if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_UPLOAD_CONTENT) || $has_write_permission) {
                     $has_access = true;
                     $tpl_sub_button = new ilTemplate("Services/InfoScreen/templates/default/tpl.submitbuttons.html", true, true);
                     $tpl_sub_button->setVariable('BTN_NAME', $this->txt("add_new_content"));
                     $tpl_sub_button->setVariable('BTN_COMMAND', 'showAddContent');
                     $info->addProperty('', $tpl_sub_button->get());
                 }
                 $info->addProperty('', $this->viewContents($has_access));
             }
             // show records
             if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_RECORDS) && $this->object->getReadRecords()) {
                 $has_access = false;
                 if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_EDIT_RECORDS) || $has_write_permission) {
                     $has_access = true;
                 }
                 $info->addSection($this->pluginObj->txt('records'));
                 $info->addProperty('', $this->viewRecords($has_access, 'record'));
             }
         } else {
             ilUtil::sendFailure($this->txt('error_connect_ac_server'));
         }
     }
     $info->hideFurtherSections();
     $tpl->setContent($info->getHTML() . $this->getPerformTriggerHtml());
     $tpl->setPermanentLink('xavc', $this->object->getRefId());
     $tpl->addILIASFooter();
 }
 public function showContent()
 {
     /*
      * var $ilUser ilUser
      */
     global $ilUser, $tpl, $ilCtrl, $ilAccess;
     $this->pluginObj->includeClass('class.ilAdobeConnectUserUtil.php');
     $this->pluginObj->includeClass('class.ilAdobeConnectServer.php');
     $has_write_permission = $ilAccess->checkAccess("write", "", $this->object->getRefId());
     $settings = ilAdobeConnectServer::_getInstance();
     $this->tabs->setTabActive('contents');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->removeFormAction();
     $this->pluginObj->includeClass('class.ilAdobeConnectQuota.php');
     $this->pluginObj->includeClass("class.ilObjAdobeConnectAccess.php");
     $is_member = ilObjAdobeConnectAccess::_hasMemberRole($ilUser->getId(), $this->object->getRefId());
     $is_admin = ilObjAdobeConnectAccess::_hasAdminRole($ilUser->getId(), $this->object->getRefId());
     if ($this->access->checkAccess("write", "", $this->object->getRefId()) || $is_member || $is_admin) {
         $presentation_url = $settings->getPresentationUrl();
         $form = new ilPropertyFormGUI();
         $form->setTitle($this->pluginObj->txt('access_meeting_title'));
         $this->object->doRead();
         if ($this->object->getStartDate() != NULL) {
             $ilAdobeConnectUser = new ilAdobeConnectUserUtil($this->user->getId());
             $ilAdobeConnectUser->ensureAccountExistance();
             $xavc_login = $ilAdobeConnectUser->getXAVCLogin();
             $quota = new ilAdobeConnectQuota();
             // show button
             if (($this->object->getPermanentRoom() == 1 || $this->doProvideAccessLink()) && $this->object->isParticipant($xavc_login)) {
                 $this->pluginObj->includeClass('class.ilAdobeConnectRoles.php');
                 $xavcRoles = new ilAdobeConnectRoles($this->object->getRefId());
                 if (!$quota->mayStartScheduledMeeting($this->object->getScoId())) {
                     $href = $this->txt("meeting_not_available_no_slots");
                     $button_disabled = true;
                 } else {
                     if (!$xavcRoles->isAdministrator($this->user->getId()) && count($current_pax = $this->object->getCurrentPax()) > $this->object->getMaxPax() && !in_array($this->object->getPrincipalId($xavc_login), $current_pax)) {
                         $href = $this->txt("meeting_full");
                         $button_disabled = true;
                     } else {
                         $href = '<a href="' . $this->ctrl->getLinkTarget($this, 'performSso') . '" target="_blank" >' . $presentation_url . $this->object->getURL() . '</a>';
                         $button_disabled = false;
                     }
                 }
             } else {
                 $href = $this->txt("meeting_not_available");
                 $button_disabled = true;
             }
             if ($button_disabled == true) {
                 $button_txt = $href;
             } else {
                 $button_txt = $this->pluginObj->txt('enter_vc');
             }
             $button_target = ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget($this, 'performSso', '', false, false);
             $button_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.bigbutton.html", true, true);
             $button_tpl->setVariable('BUTTON_TARGET', $button_target);
             $button_tpl->setVariable('BUTTON_TEXT', $button_txt);
             $big_button = $button_tpl->get();
             $info->addSection('');
             if ($button_disabled == true) {
                 $info->addProperty('', $href);
             } else {
                 $info->addProperty('', $big_button . "<br />");
             }
             // show instructions
             if (strlen($this->object->getInstructions()) > 1) {
                 $info->addSection($this->lng->txt('exc_instruction'));
                 $info->addProperty('', nl2br($this->object->getInstructions()));
             }
             // show contact info
             if (strlen($this->object->getContactInfo()) > 1) {
                 $info->addSection($this->pluginObj->txt('contact_information'));
                 $info->addProperty('', nl2br($this->object->getContactInfo()));
             }
             //show contents
             if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_CONTENTS) && $this->object->getReadContents('content') || ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_UPLOAD_CONTENT) || $has_write_permission) {
                 $admins_only = '';
                 if (!$this->object->getReadContents('content')) {
                     $admins_only = $this->pluginObj->txt('admins_only');
                 }
                 $info->addSection($this->pluginObj->txt('file_uploads') . ' ' . $admins_only);
                 $info->setFormAction($this->ctrl->getFormAction($this, 'showContent'));
                 $has_access = false;
                 if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_UPLOAD_CONTENT) || $has_write_permission) {
                     $has_access = true;
                     $tpl_sub_button = new ilTemplate("Services/InfoScreen/templates/default/tpl.submitbuttons.html", true, true);
                     $tpl_sub_button->setVariable('BTN_NAME', $this->txt("add_new_content"));
                     $tpl_sub_button->setVariable('BTN_COMMAND', 'showAddContent');
                     $info->addProperty('', $tpl_sub_button->get());
                 }
                 $info->addProperty('', $this->viewContents($has_access));
             }
             // show records
             if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_RECORDS) && $this->object->getReadRecords() || ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_EDIT_RECORDS) || $has_write_permission) {
                 $has_access = false;
                 $admins_only = '';
                 if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_EDIT_RECORDS) || $has_write_permission) {
                     $has_access = true;
                     if (!$this->object->getReadRecords()) {
                         $admins_only = $this->pluginObj->txt('admins_only');
                     }
                 }
                 $info->addSection($this->pluginObj->txt('records') . ' ' . $admins_only);
                 $info->addProperty('', $this->viewRecords($has_access, 'record'));
             }
         } else {
             ilUtil::sendFailure($this->txt('error_connect_ac_server'));
         }
     }
     $info->hideFurtherSections('', true);
     $tpl->setContent($info->getHTML() . $this->getPerformTriggerHtml());
     $tpl->setPermanentLink('xavc', $this->object->getRefId());
     $tpl->addILIASFooter();
 }