ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilExercisePlaceholderDescription Class Reference
+ Inheritance diagram for ilExercisePlaceholderDescription:
+ Collaboration diagram for ilExercisePlaceholderDescription:

Public Member Functions

 __construct (ilDefaultPlaceholderDescription $defaultPlaceholderDescriptionObject=null, ilLanguage $language=null, ilUserDefinedFieldsPlaceholderDescription $userDefinedFieldPlaceHolderDescriptionObject=null)
 
 createPlaceholderHtmlDescription (ilTemplate $template=null)
 This methods MUST return an array containing an array with the the description as array value. More...
 
 getPlaceholderDescriptions ()
 This method MUST return an array containing an array with the the description as array value. More...
 
- Public Member Functions inherited from ilCertificatePlaceholderDescription
 createPlaceholderHtmlDescription ()
 

Private Attributes

 $defaultPlaceHolderDescriptionObject
 
 $language
 
 $placeholder
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilExercisePlaceholderDescription::__construct ( ilDefaultPlaceholderDescription  $defaultPlaceholderDescriptionObject = null,
ilLanguage  $language = null,
ilUserDefinedFieldsPlaceholderDescription  $userDefinedFieldPlaceHolderDescriptionObject = null 
)
Parameters
ilDefaultPlaceholderDescription | null$defaultPlaceholderDescriptionObject
ilLanguage | null$language
ilUserDefinedFieldsPlaceholderDescription | null$userDefinedFieldPlaceHolderDescriptionObject

Definition at line 29 of file class.ilExercisePlaceholderDescription.php.

References $DIC, $language, and ilUtil\prepareFormOutput().

33  {
34  global $DIC;
35 
36  if (null === $language) {
37  $language = $DIC->language();
38  }
39  $this->language = $language;
40 
41  if (null === $defaultPlaceholderDescriptionObject) {
42  $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription($language, $userDefinedFieldPlaceHolderDescriptionObject);
43  }
44  $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
45 
46  $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
47 
48  $this->placeholder['RESULT_PASSED'] = ilUtil::prepareFormOutput($language->txt('certificate_var_result_passed'));
49  $this->placeholder['RESULT_MARK'] = ilUtil::prepareFormOutput($language->txt('certificate_var_result_mark_short'));
50  $this->placeholder['EXERCISE_TITLE'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_exercisetitle'));
51  $this->placeholder['DATE_COMPLETED'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_datetime_completed'));
52  $this->placeholder['DATETIME_COMPLETED'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_datetime_completed'));
53  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
global $DIC
Definition: saml.php:7
getPlaceholderDescriptions()
This method MUST return an array containing an array with the the description as array value...
Collection of basic placeholder values that can be used.
txt($a_topic, $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:

Member Function Documentation

◆ createPlaceholderHtmlDescription()

ilExercisePlaceholderDescription::createPlaceholderHtmlDescription ( ilTemplate  $template = null)

This methods MUST return an array containing an array with the the description as array value.

Parameters
ilTemplate$template
Returns
mixed - [PLACEHOLDER] => 'description'

Definition at line 63 of file class.ilExercisePlaceholderDescription.php.

References $id, and $template.

63  : string
64  {
65  if (null === $template) {
66  $template = new ilTemplate('tpl.default_description.html', true, true, 'Services/Certificate');
67  }
68 
69  $template->setVariable('PLACEHOLDER_INTRODUCTION', $this->language->txt('certificate_ph_introduction'));
70 
71  $template->setCurrentBlock('items');
72  foreach ($this->placeholder as $id => $caption) {
73  $template->setVariable('ID', $id);
74  $template->setVariable('TXT', $caption);
75  $template->parseCurrentBlock();
76  }
77 
78  return $template->get();
79  }
if(!array_key_exists('StateId', $_REQUEST)) $id
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:613
special template class to simplify handling of ITX/PEAR
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
get( $part="DEFAULT", $add_error_mess=false, $handle_referer=false, $add_ilias_footer=false, $add_standard_elements=false, $a_main_menu=true, $a_tabs=true)
??? public
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...

◆ getPlaceholderDescriptions()

ilExercisePlaceholderDescription::getPlaceholderDescriptions ( )

This method MUST return an array containing an array with the the description as array value.

Returns
mixed - [PLACEHOLDER] => 'description'

Implements ilCertificatePlaceholderDescription.

Definition at line 87 of file class.ilExercisePlaceholderDescription.php.

References $placeholder.

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

ilExercisePlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

Definition at line 12 of file class.ilExercisePlaceholderDescription.php.

◆ $language

ilExercisePlaceholderDescription::$language
private

Definition at line 17 of file class.ilExercisePlaceholderDescription.php.

Referenced by __construct().

◆ $placeholder

ilExercisePlaceholderDescription::$placeholder
private

The documentation for this class was generated from the following file: