19declare(strict_types=1);
41 $this->
language->loadLanguageModule(
'certificate');
61 $object = $this->object_helper->getInstanceByObjId(
$objId);
62 $placeholders = $this->default_values->getPlaceholderValues($userId,
$objId);
64 $placeholders[
'OBJECT_TITLE'] = $this->util_helper->prepareFormOutput($object->getTitle());
65 $placeholders[
'OBJECT_DESCRIPTION'] = $this->util_helper->prepareFormOutput($object->getDescription());
66 $placeholders[
'MASTERY_SCORE'] = $this->util_helper->prepareFormOutput(
71 $placeholders[
'REACHED_SCORE'] = $this->util_helper->prepareFormOutput(
75 $placeholders[
'DATE_COMPLETED'] =
'';
76 $placeholders[
'DATETIME_COMPLETED'] =
'';
77 $completion_date = $this->lp_status_helper->lookupStatusChanged(
$objId, $userId);
78 if ($completion_date !==
'') {
79 $user = $this->object_helper->getInstanceByObjId($userId);
80 $user = $user instanceof
ilObjUser ? $user :
null;
81 $placeholders[
'DATE_COMPLETED'] = $this->date_helper->formatDate($completion_date, $user);
82 $placeholders[
'DATETIME_COMPLETED'] = $this->date_helper->formatDateTime($completion_date, $user);
97 $placeholders = $this->default_values->getPlaceholderValuesForPreview($userId,
$objId);
99 'OBJECT_TITLE' =>
'lti_cert_ph_object_title',
100 'OBJECT_DESCRIPTION' =>
'lti_cert_ph_object_description',
101 'MASTERY_SCORE' =>
'lti_cert_ph_mastery_score',
102 'REACHED_SCORE' =>
'lti_cert_ph_reached_score',
103 ] as $placeholder => $txt) {
104 $placeholders[$placeholder] = $this->util_helper->prepareFormOutput($this->
language->txt($txt));
107 return $placeholders;
112 return sprintf(
'%0.2f %%', 100 * $share);
Just a wrapper class to create Unit Test for other classes.
Collection of basic placeholder values that can be used.