/**
  * @param int $a_ref_id
  * @param int $a_id_type
  * @param int $a_parent_node_id
  */
 public function __construct($a_ref_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
 {
     global $ilCtrl, $ilAccess, $lng, $ilUser, $ilTabs, $tpl;
     parent::__construct($a_ref_id, $a_id_type, $a_parent_node_id);
     $this->ctrl = $ilCtrl;
     $this->access = $ilAccess;
     $this->lng = $lng;
     $this->user = $ilUser;
     $this->tabs = $ilTabs;
     $this->tpl = $tpl;
     $this->pl = new ilEdupadPlugin();
 }
 /**
  * Forbids to import and to close an roomsharing pool.
  *
  * @see ilObjectPluginGUI::initCreateForm()
  *
  * @param string $a_new_type New type
  *
  * @return array Array with Creation methods. CFORM_CLONE and CFORM_IMPORT are ommited
  */
 public function initCreationForms($a_new_type)
 {
     $forms = parent::initCreationForms($a_new_type);
     unset($forms[self::CFORM_CLONE]);
     unset($forms[self::CFORM_IMPORT]);
     return $forms;
 }
 /**
  *
  * @global <type> $ilCtrl
  * @global <type> $ilUser
  * @param ilObjVitero $newObj
  */
 public function afterSave($newObj)
 {
     global $ilCtrl, $ilUser;
     $settings = ilViteroSettings::getInstance();
     $form = $this->initCreateForm('xvit');
     $form->checkInput();
     $room = new ilViteroRoom();
     $room->setRoomSize($form->getInput('room_size'));
     if ($settings->isCafeEnabled() and $settings->isStandardRoomEnabled()) {
         if ($form->getInput('atype') == ilViteroRoom::TYPE_CAFE) {
             $room = $this->loadCafeSettings($form, $room);
         } else {
             $room = $this->loadStandardRoomSettings($form, $room);
         }
         $room->isCafe($form->getInput('atype') == ilViteroRoom::TYPE_CAFE);
     } elseif ($settings->isCafeEnabled()) {
         $this->loadCafeSettings($form, $room);
     } else {
         $this->loadStandardRoomSettings($form, $room);
     }
     try {
         $newObj->initVitero($ilUser->getId());
         $newObj->initAppointment($room);
         ilUtil::sendSuccess(ilViteroPlugin::getInstance()->txt('created_vitero'), true);
     } catch (ilViteroConnectorException $e) {
         ilUtil::sendFailure($e->getViteroMessage(), true);
     }
     $newObj->addParticipants(array($ilUser->getId()), ilObjVitero::ADMIN);
     parent::afterSave($newObj);
 }
 /**
  * @param string $a_sub_type
  * @param int    $a_sub_id
  * @return ilObjectListGUI|ilObjTestOverviewListGUI
  */
 protected function initHeaderAction($a_sub_type = null, $a_sub_id = null)
 {
     /**
      * @var $ilUser ilObjUser
      */
     global $ilUser;
     $lg = parent::initHeaderAction();
     if ($lg instanceof ilObjTestOverviewListGUI) {
         if ($ilUser->getId() != ANONYMOUS_USER_ID) {
             // Maybe handle notifications in future ...
         }
     }
     return $lg;
 }
 /**
  *
  * @global <type> $ilCtrl
  * @global <type> $ilUser
  * @param ilObj $newObj
  */
 public function afterSave($newObj)
 {
     global $ilCtrl, $ilUser;
     $form = $this->initCreateForm('xomv');
     $form->checkInput();
     $newObj->createRoom($form->getInput("rmtypes"), $form->getInput("online"));
     parent::afterSave($newObj);
 }