本文整理匯總了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;
}