|
| __construct (?ilDefaultPlaceholderValues $defaultPlaceholderValues=null, ?ilLanguage $language=null, ?ilCertificateObjectHelper $objectHelper=null, ?ilCertificateUserObjectHelper $userObjectHelper=null, ?ilCertificateLPStatusHelper $lpStatusHelper=null, ?ilCertificateUtilHelper $utilHelper=null, ?ilCertificateDateHelper $dateHelper=null) |
|
| getPlaceholderValuesForPreview (int $userId, int $objId) |
|
| getPlaceholderValues (int $userId, int $objId) |
| This method MUST return an array that contains the actual data for the given user of the given object. More...
|
|
| getPlaceholderValuesForPreview (int $userId, int $objId) |
| This method is different then the 'getPlaceholderValues' method, this method is used to create a placeholder value array containing dummy values that is used to create a preview certificate. More...
|
|
◆ __construct()
◆ getMasteryScore()
◆ getPlaceholderValuesForPreview()
ilLTIConsumerPlaceholderValues::getPlaceholderValuesForPreview |
( |
int |
$userId, |
|
|
int |
$objId |
|
) |
| |
- Exceptions
-
- Returns
- mixed[]
Implements ilCertificatePlaceholderValues.
Definition at line 108 of file class.ilLTIConsumerPlaceholderValues.php.
108 : array
109 {
110 $placeholders = $this->defaultPlaceholderValuesObject->getPlaceholderValuesForPreview($userId,
$objId);
111
112 $placeholders[
'OBJECT_TITLE'] = $this->utilHelper->prepareFormOutput($this->
language->txt(
'lti_cert_ph_object_title'));
113 $placeholders[
'OBJECT_DESCRIPTION'] = $this->utilHelper->prepareFormOutput($this->
language->txt(
'lti_cert_ph_object_description'));
114
115 $placeholders[
'MASTERY_SCORE'] = $this->utilHelper->prepareFormOutput($this->
language->txt(
'lti_cert_ph_mastery_score'));
116 $placeholders[
'REACHED_SCORE'] = $this->utilHelper->prepareFormOutput($this->
language->txt(
'lti_cert_ph_reached_score'));
117
118 return $placeholders;
119 }
References $objId, and ILIAS\UI\examples\Symbol\Glyph\Language\language().
◆ getReachedScore()
ilLTIConsumerPlaceholderValues::getReachedScore |
( |
ilObjLTIConsumer |
$object, |
|
|
int |
$userId |
|
) |
| |
|
protected |
Definition at line 161 of file class.ilLTIConsumerPlaceholderValues.php.
161 : string
162 {
164
165 $reachedScore = sprintf('%0.2f %%', 0);
166 if ($userResult !== null) {
167 $reachedScore = sprintf('%0.2f %%', $userResult->getResult() * 100);
168 }
169
170 return $reachedScore;
171 }
static getByKeys(int $a_obj_id, int $a_usr_id, ?bool $a_create=false)
Get a result by object and user key.
References ilLTIConsumerResult\getByKeys(), and ilObject\getId().
◆ $dateHelper
ilLTIConsumerPlaceholderValues::$dateHelper |
|
private |
◆ $defaultPlaceholderValuesObject
◆ $language
ilLanguage ilLTIConsumerPlaceholderValues::$language |
|
private |
◆ $lpStatusHelper
◆ $objectHelper
◆ $utilHelper
The documentation for this class was generated from the following file: