/** * Get item properties * * @return array array of property arrays: * "alert" (boolean) => display as an alert property (usually in red) * "property" (string) => property name * "value" (string) => property value */ function getProperties() { global $lng, $ilUser, $ilias; // BEGIN WebDAV get parent properties $props = parent::getProperties(); // END WebDAV get parent properties return $props; }
/** * Get item properties * * @return array array of property arrays: * "alert" (boolean) => display as an alert property (usually in red) * "property" (string) => property name * "value" (string) => property value */ function getProperties() { global $lng; // BEGIN WebDAV: Get parent properties // BEGIN ChangeEvent: Get parent properties $props = parent::getProperties(); // END ChangeEvent: Get parent properties // END WebDAV: Get parent properties // offline include_once 'Modules/Poll/classes/class.ilObjPollAccess.php'; if (!ilObjPollAccess::_lookupOnline($this->obj_id)) { $props[] = array("alert" => true, "property" => $lng->txt("status"), "value" => $lng->txt("offline")); } return $props; }
/** * Get item properties * * @return array array of property arrays: * "alert" (boolean) => display as an alert property (usually in red) * "property" (string) => property name * "value" (string) => property value */ function getProperties() { global $lng, $ilUser; $props = parent::getProperties(); // offline include_once 'Modules/Course/classes/class.ilObjCourseAccess.php'; if (ilObjCourseAccess::_isOffline($this->obj_id)) { $showRegistrationInfo = false; $props[] = array("alert" => true, "property" => $lng->txt("status"), "value" => $lng->txt("offline")); } // blocked include_once 'Modules/Course/classes/class.ilCourseParticipant.php'; $members = ilCourseParticipant::_getInstanceByObjId($this->obj_id, $ilUser->getId()); if ($members->isBlocked($ilUser->getId()) and $members->isAssigned($ilUser->getId())) { $props[] = array("alert" => true, "property" => $lng->txt("member_status"), "value" => $lng->txt("crs_status_blocked")); } // pending subscription include_once 'Modules/Course/classes/class.ilCourseParticipants.php'; if (ilCourseParticipants::_isSubscriber($this->obj_id, $ilUser->getId())) { $props[] = array("alert" => true, "property" => $lng->txt("member_status"), "value" => $lng->txt("crs_status_pending")); } include_once './Modules/Course/classes/class.ilObjCourseAccess.php'; $info = ilObjCourseAccess::lookupRegistrationInfo($this->obj_id); if ($info['reg_info_list_prop']) { $props[] = array('alert' => false, 'newline' => true, 'property' => $info['reg_info_list_prop']['property'], 'value' => $info['reg_info_list_prop']['value']); } if ($info['reg_info_list_prop_limit']) { $props[] = array('alert' => false, 'newline' => false, 'property' => $info['reg_info_list_prop_limit']['property'], 'propertyNameVisible' => strlen($info['reg_info_list_prop_limit']['property']) ? true : false, 'value' => $info['reg_info_list_prop_limit']['value']); } // waiting list include_once './Modules/Course/classes/class.ilCourseWaitingList.php'; if (ilCourseWaitingList::_isOnList($ilUser->getId(), $this->obj_id)) { $props[] = array("alert" => true, "property" => $lng->txt('member_status'), "value" => $lng->txt('on_waiting_list')); } // check for certificates include_once "./Modules/Course/classes/class.ilCourseCertificateAdapter.php"; if (ilCourseCertificateAdapter::_hasUserCertificate($ilUser->getId(), $this->obj_id)) { $lng->loadLanguageModule('certificate'); $cmd_link = "ilias.php?baseClass=ilRepositoryGUI&ref_id=" . $this->ref_id . "&cmd=deliverCertificate"; $props[] = array("alert" => false, "property" => $lng->txt("passed"), "value" => '<a href="' . $cmd_link . '">' . $lng->txt("download_certificate") . '</a>'); } return $props; }
/** * Get item properties * * @return array array of property arrays: * "alert" (boolean) => display as an alert property (usually in red) * "property" (string) => property name * "value" (string) => property value */ function getProperties() { global $lng, $rbacsystem, $ilUser; // BEGIN WebDAV get parent properties $props = parent::getProperties(); // END WebDAV get parent properties include_once './Modules/Course/classes/class.ilObjCourseAccess.php'; $info = ilObjGroupAccess::lookupRegistrationInfo($this->obj_id); //var_dump($info); if ($info['reg_info_list_prop']) { $props[] = array('alert' => false, 'newline' => true, 'property' => $info['reg_info_list_prop']['property'], 'value' => $info['reg_info_list_prop']['value']); } if ($info['reg_info_list_prop_limit']) { $props[] = array('alert' => false, 'newline' => false, 'property' => $info['reg_info_list_prop_limit']['property'], 'propertyNameVisible' => strlen($info['reg_info_list_prop_limit']['property']) ? true : false, 'value' => $info['reg_info_list_prop_limit']['value']); } // waiting list include_once './Modules/Group/classes/class.ilGroupWaitingList.php'; if (ilGroupWaitingList::_isOnList($ilUser->getId(), $this->obj_id)) { $props[] = array("alert" => true, "property" => $lng->txt('member_status'), "value" => $lng->txt('on_waiting_list')); } return $props; }
/** * get properties * * @access public * @return */ public function getProperties() { return parent::getProperties(); }
/** * Get item properties * * @return array array of property arrays: * "alert" (boolean) => display as an alert property (usually in red) * "property" (string) => property name * "value" (string) => property value */ function getProperties() { global $lng, $ilUser; // BEGIN WebDAV: Get parent properties $props = parent::getProperties(); // END WebDAV: Get parent properties // to do: implement extra smaller file info object include_once "./Modules/File/classes/class.ilObjFileAccess.php"; // Display a warning if a file is not a hidden Unix file, and // the filename extension is missing if (!preg_match('/^\\.|\\.[a-zA-Z0-9]+$/', $this->title)) { $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"), "value" => $lng->txt("filename_extension_missing"), 'propertyNameVisible' => false); } // BEGIN WebDAV: Only display relevant information. $props[] = array("alert" => false, "property" => $lng->txt("type"), "value" => ilObjFileAccess::_getFileExtension($this->title), 'propertyNameVisible' => false); $fileData = ilObjFileAccess::_lookupFileData($this->obj_id); $props[] = array("alert" => false, "property" => $lng->txt("size"), "value" => ilFormat::formatSize($fileData['file_size'], 'short'), 'propertyNameVisible' => false); $version = $fileData['version']; if ($version > 1) { $props[] = array("alert" => false, "property" => $lng->txt("version"), "value" => $version); } $props[] = array("alert" => false, "property" => $lng->txt("last_update"), "value" => ilObject::_lookupLastUpdate($this->obj_id, true), 'propertyNameVisible' => false); // END WebDAV: Only display relevant information. return $props; }
/** * Get item properties * * @return array array of property arrays: * "alert" (boolean) => display as an alert property (usually in red) * "property" (string) => property name * "value" (string) => property value */ function getProperties() { global $lng, $ilUser; // BEGIN WebDAV: Get parent properties $props = parent::getProperties(); // END WebDAV: Get parent properties // to do: implement extra smaller file info object include_once "./Modules/File/classes/class.ilObjFileAccess.php"; // Display a warning if a file is not a hidden Unix file, and // the filename extension is missing if (!preg_match('/^\\.|\\.[a-zA-Z0-9]+$/', $this->title)) { $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"), "value" => $lng->txt("filename_extension_missing"), 'propertyNameVisible' => false); } // BEGIN WebDAV: Only display relevant information. $props[] = array("alert" => false, "property" => $lng->txt("type"), "value" => ilObjFileAccess::_getFileExtension($this->title), 'propertyNameVisible' => false); $fileData = ilObjFileAccess::getListGUIData($this->obj_id); if (is_array($fileData)) { $props[] = array("alert" => false, "property" => $lng->txt("size"), "value" => ilFormat::formatSize($fileData['size'], 'short'), 'propertyNameVisible' => false); $version = $fileData['version']; if ($version > 1) { // add versions link if (parent::checkCommandAccess("write", "versions", $this->ref_id, $this->type)) { $link = $this->getCommandLink("versions"); $value = "<a href=\"{$link}\">" . $lng->txt("version") . ": {$version}</a>"; } else { $value = $lng->txt("version") . ": {$version}"; } $props[] = array("alert" => false, "property" => $lng->txt("version"), "value" => $value, "propertyNameVisible" => false); } // #6040 if ($fileData["date"]) { $props[] = array("alert" => false, "property" => $lng->txt("last_update"), "value" => ilDatePresentation::formatDate(new ilDateTime($fileData["date"], IL_CAL_DATETIME)), 'propertyNameVisible' => false); } } // END WebDAV: Only display relevant information. return $props; }