19 declare(strict_types=1);
36 $this->
ctrl->setParameter($this,
'view', $this->viewSettings->getCurrentView());
47 $user_table->disablePermissionCheck(
true);
48 $rows = $user_table->fetchSingleUserRootAssignments($this->
user->getId());
51 foreach ($rows as $row) {
53 if (!$this->
isReadable($prg) || !$prg->isActive()) {
58 $this->
lng->txt(
'prg_dash_label_minimum') => $row->getPointsRequired(),
59 $this->
lng->txt(
'prg_dash_label_gain') => $row->getPointsCurrent(),
60 $this->
lng->txt(
'prg_dash_label_status') => $row->getStatus(),
66 $properties[$this->
lng->txt(
'prg_dash_label_valid')] = $row->getExpiryDate() ?: $row->getValidity();
69 $properties[$this->
lng->txt(
'certificate')] = $cert_link;
72 $properties[$this->
lng->txt(
'prg_dash_label_finish_until')] = $row->getDeadline();
80 $prg->getDescription(),
100 if (is_null($this->visible_on_pd_mode)) {
101 $this->visible_on_pd_mode =
128 if ($cert_validator->isCertificateDownloadable($usr_id, $prg_obj_id)) {
129 $this->
ctrl->setParameterByClass(
'ilObjStudyProgrammeGUI',
'ref_id', $prg_ref_id);
130 $target = $this->
ctrl->getLinkTargetByClass(
"ilObjStudyProgrammeGUI",
"deliverCertificate");
131 $this->
ctrl->setParameterByClass(
'ilObjStudyProgrammeGUI',
'ref_id',
null);
132 $this->
lng->loadLanguageModule(
'certificate');
133 return $this->
renderer->render($this->
factory->link()->standard($this->
lng->txt(
'download_certificate'), $target));
const SETTING_VISIBLE_ON_PD_ALLWAYS
const VIEW_MY_STUDYPROGRAMME
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const SETTING_VISIBLE_ON_PD_READ
string $visible_on_pd_mode
Validates if an active certificate is stored in the database and can be downloaded by the user...
const SETTING_VISIBLE_ON_PD
isReadable(ilObjStudyProgramme $prg)
static getInstanceByObjId(int $obj_id)
getRemoveMultipleActionText()
maybeGetCertificateLink(int $usr_id, int $prg_obj_id, int $prg_ref_id)