54 $language->loadLanguageModule(
'certificate');
58 if (null === $defaultPlaceholderDescriptionObject) {
61 $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
68 $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
70 $this->placeholder[
'SCORM_TITLE'] =
$language->txt(
'certificate_ph_scormtitle');
71 $this->placeholder[
'SCORM_POINTS'] =
$language->txt(
'certificate_ph_scormpoints');
72 $this->placeholder[
'SCORM_POINTS_MAX'] =
$language->txt(
'certificate_ph_scormmaxpoints');
86 if (null === $template) {
87 $template =
new ilTemplate(
'tpl.scorm_description.html',
true,
true,
'Services/Certificate');
90 $template->setCurrentBlock(
'items');
92 foreach ($this->placeholder as $id => $caption) {
93 $template->setVariable(
'ID', $id);
94 $template->setVariable(
'TXT', $caption);
95 $template->parseCurrentBlock();
98 $template->setVariable(
'PH_INTRODUCTION', $this->
language->txt(
'certificate_ph_introduction'));
100 $collection = $this->learningProgressObject->getCollectionInstance();
102 $items = $collection->getPossibleItems();
106 $template->setCurrentBlock(
'NO_SCO');
107 $template->setVariable(
'PH_NO_SCO', $this->
language->txt(
'certificate_ph_no_sco'));
108 $template->parseCurrentBlock();
110 $template->setCurrentBlock(
'SCOS');
111 $template->setVariable(
'PH_SCOS', $this->
language->txt(
'certificate_ph_scos'));
112 $template->parseCurrentBlock();
113 $template->setCurrentBlock(
'SCO_HEADER');
114 $template->setVariable(
'PH_TITLE_SCO', $this->
language->txt(
'certificate_ph_title_sco'));
115 $template->setVariable(
'PH_SCO_TITLE', $this->
language->txt(
'certificate_ph_sco_title'));
116 $template->setVariable(
'PH_SCO_POINTS_RAW', $this->
language->txt(
'certificate_ph_sco_points_raw'));
117 $template->setVariable(
'PH_SCO_POINTS_MAX', $this->
language->txt(
'certificate_ph_sco_points_max'));
118 $template->setVariable(
'PH_SCO_POINTS_SCALED', $this->
language->txt(
'certificate_ph_sco_points_scaled'));
119 $template->parseCurrentBlock();
124 foreach ($items as $item_id => $sahs_item) {
125 if ($collection->isAssignedEntry($item_id)) {
126 $template->setCurrentBlock(
'SCO');
127 $template->setVariable(
'SCO_TITLE', $sahs_item[
'title']);
128 $template->setVariable(
'PH_SCO_TITLE',
'[SCO_T_' . $counter .
']');
129 $template->setVariable(
'PH_SCO_POINTS_RAW',
'[SCO_P_' . $counter .
']');
130 $template->setVariable(
'PH_SCO_POINTS_MAX',
'[SCO_PM_' . $counter .
']');
131 $template->setVariable(
'PH_SCO_POINTS_SCALED',
'[SCO_PP_' . $counter .
']');
132 $template->parseCurrentBlock();
138 return $template->get();
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
__construct(ilObject $object, ilDefaultPlaceholderDescription $defaultPlaceholderDescriptionObject=null, ilLanguage $language=null, ilObjectLP $learningProgressObject=null, ilUserDefinedFieldsPlaceholderDescription $userDefinedFieldPlaceHolderDescriptionObject=null)
getPlaceholderDescriptions()
This method MUST return an array containing an array with the the description as array value...
createPlaceholderHtmlDescription(ilTemplate $template=null)
This methods MUST return an array containing an array with the the description as array value...
Collection of basic placeholder values that can be used.
static getInstance($a_obj_id)
$defaultPlaceHolderDescriptionObject