19declare(strict_types=1);
60 $database =
$dic->database();
61 $looger =
$dic->logger()->cert();
71 if (
null === $certificateSettings) {
94 return (
bool) $this->certificateSettings->get(
'active',
'0');
103 public function getEntries(
int $ts_start,
int $ts_end): array
107 $certificates = $this->userCertificateRepository->fetchActiveCertificatesInIntervalForPresentation(
113 foreach ($certificates as $certificate) {
114 $objectId = $certificate->getUserCertificate()->getObjId();
116 $this->
ctrl->setParameterByClass(
117 ilUserCertificateGUI::class,
119 $certificate->getUserCertificate()->getId()
121 $href = $this->
ctrl->getLinkTargetByClass(
123 ilDashboardGUI::class,
124 ilAchievementsGUI::class,
125 ilUserCertificateGUI::class
129 $this->
ctrl->clearParametersByClass(ilUserCertificateGUI::class);
131 $prefixTextWithLink = sprintf(
132 $this->
lng->txt(
'certificate_achievement_sub_obj'),
133 $this->uiRenderer->render($this->uiFactory->link()->standard(
134 $this->getEmphasizedTitle($certificate->getObjectTitle()),
140 $this->
lng->txt(
'certificate_achievement'),
147 $this->utilHelper->getImagePath(
"icon_cert.svg"),
148 $certificate->getUserCertificate()->getAcquiredTimestamp(),
158 return $this->
lng->txt(
'certificates');
Customizing of pimple-DIC for ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilLearningHistoryFactory $factory
ilSetting $certificateSettings
__construct(int $user_id, ilLearningHistoryFactory $factory, ilLanguage $lng, ?ilTemplate $template=null, ?Container $dic=null, ?ilUserCertificateRepository $userCertificateRepository=null, ?ilCtrlInterface $ctrl=null, ?ilSetting $certificateSettings=null, ?Factory $uiFactory=null, ?Renderer $uiRenderer=null, ?ilCertificateUtilHelper $utilHelper=null)
ilUserCertificateRepository $userCertificateRepository
getEntries(int $ts_start, int $ts_end)
Get entries.
ilCertificateUtilHelper $utilHelper
Just a wrapper class to create Unit Test for other classes.
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR
This is how the factory for UI elements looks.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc