public function getProperties() { global $lng; $props = array(); if (!ilObjRoomSharing::_lookupOnline($this->obj_id)) { $props[] = array("alert" => true, "property" => $lng->txt("status"), "value" => $lng->txt("offline")); } return $props; }
/** * Checks wether a user may invoke a command or not * (this method is called by ilAccessHandler::checkAccess) * * Please do not check any preconditions handled by * ilConditionHandler here. Also don't do usual RBAC checks. * * @param string $a_cmd * @param string $a_permission * @param int $a_ref_id * @param int $a_obj_id * @param int $a_user_id (if not provided, current user is taken) * * @return boolean true if the pool can be shown */ public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = "") { /* @var $ilAccess ilAccessHandler */ /* @var $ilUser ilObjUser */ /* @var $lng ilLanguage */ global $ilUser, $ilAccess, $lng; if ($a_user_id === "") { $a_user_id = $ilUser->getId(); } $rVal = false; // Check whether the user has write permissions (owner has always write permissions). if ($ilAccess->checkAccessOfUser($a_user_id, 'write', '', $a_ref_id, "xrs", $a_obj_id)) { $rVal = true; } else { $rVal = ilObjRoomSharing::_lookupOnline($a_obj_id); if (!$rVal) { $lng->loadLanguageModule("rep_robj_xrs"); $message = $lng->txt('rep_robj_xrs_pool') . ' "' . ilObject2::_lookupTitle($a_obj_id) . '" ' . $lng->txt('rep_robj_xrs_is_offline'); ilUtil::sendInfo($message, true); } } return $rVal; }