本文整理汇总了PHP中ilCourseParticipants::_isParticipant方法的典型用法代码示例。如果您正苦于以下问题:PHP ilCourseParticipants::_isParticipant方法的具体用法?PHP ilCourseParticipants::_isParticipant怎么用?PHP ilCourseParticipants::_isParticipant使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilCourseParticipants
的用法示例。
在下文中一共展示了ilCourseParticipants::_isParticipant方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initHeaderAction
protected function initHeaderAction($a_sub_type = null, $a_sub_id = null)
{
global $ilSetting, $ilUser;
$lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
if ($lg && $this->ref_id && ilCourseParticipants::_isParticipant($this->ref_id, $ilUser->getId())) {
// certificate
include_once "Services/Certificate/classes/class.ilCertificate.php";
if (ilCertificate::isActive() && ilCertificate::isObjectActive($this->object->getId()) && ilCourseParticipants::getDateTimeOfPassed($this->object->getId(), $ilUser->getId())) {
$cert_url = $this->ctrl->getLinkTarget($this, "deliverCertificate");
$this->lng->loadLanguageModule("certificate");
$lg->addCustomCommand($cert_url, "download_certificate");
$lg->addHeaderIcon("cert_icon", ilUtil::getImagePath("icon_cert.svg"), $this->lng->txt("download_certificate"), null, null, $cert_url);
}
// notification
if ($ilSetting->get("crsgrp_ntf")) {
if (!$ilUser->getPref("grpcrs_ntf_" . $this->ref_id)) {
$lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_off.svg"), $this->lng->txt("crs_notification_deactivated"));
$this->ctrl->setParameter($this, "crs_ntf", 1);
$caption = "crs_activate_notification";
} else {
$lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_on.svg"), $this->lng->txt("crs_notification_activated"));
$this->ctrl->setParameter($this, "crs_ntf", 0);
$caption = "crs_deactivate_notification";
}
$lg->addCustomCommand($this->ctrl->getLinkTarget($this, "saveNotification"), $caption);
$this->ctrl->setParameter($this, "crs_ntf", "");
}
}
return $lg;
}