当前位置: 首页>>代码示例>>PHP>>正文


PHP ilCourseParticipants::_isSubscriber方法代码示例

本文整理汇总了PHP中ilCourseParticipants::_isSubscriber方法的典型用法代码示例。如果您正苦于以下问题:PHP ilCourseParticipants::_isSubscriber方法的具体用法?PHP ilCourseParticipants::_isSubscriber怎么用?PHP ilCourseParticipants::_isSubscriber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilCourseParticipants的用法示例。


在下文中一共展示了ilCourseParticipants::_isSubscriber方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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;
     $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;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:51,代码来源:class.ilObjCourseListGUI.php


注:本文中的ilCourseParticipants::_isSubscriber方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。