ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilAssNestedOrderingElementsInputGUI Class Reference
+ Inheritance diagram for ilAssNestedOrderingElementsInputGUI:
+ Collaboration diagram for ilAssNestedOrderingElementsInputGUI:

Public Member Functions

 __construct (ilAssOrderingFormValuesObjectsConverter $converter, $postVar)
 ilAssNestedOrderingElementsInputGUI constructor. More...
 
 setElementList (ilAssOrderingElementList $elementList)
 
 getElementList ($questionId)
 
 prepareReprintable (assQuestion $question)
 
 getInstanceId ()
 
 getContext ()
 
 setContext ($context)
 
 getUniquePrefix ()
 
 setUniquePrefix ($uniquePrefix)
 
 setOrderingType ($orderingType)
 
 getOrderingType ()
 
 setElementImagePath ($elementImagePath)
 
 getElementImagePath ()
 
 setThumbPrefix ($thumbnailFilenamePrefix)
 
 getThumbPrefix ()
 
 setShowCorrectnessIconsEnabled ($showCorrectnessIconsEnabled)
 
 isShowCorrectnessIconsEnabled ()
 
 getCorrectnessIconFilename ($correctness)
 
 setCorrectnessIconFilename ($correctness, $iconFilename)
 
 getCorrectnessLangVar ($correctness)
 
 setCorrectnessLangVar ($correctness, $langVar)
 
 getCorrectnessText ($correctness)
 
 getCorrectnessTrueElementList ()
 
 setCorrectnessTrueElementList (ilAssOrderingElementList $correctnessTrueElementList)
 
 isPostSubmit ($data)
 
- Public Member Functions inherited from ilMultipleNestedOrderingElementsInputGUI
 __construct ($a_title='', $a_postvar='')
 
 setInstanceId ($instanceId)
 
 getInstanceId ()
 
 setInteractionEnabled ($interactionEnabled)
 
 isInteractionEnabled ()
 
 isNestingEnabled ()
 
 setNestingEnabled ($nestingEnabled)
 
 isStylingDisabled ()
 
 setStylingDisabled ($stylingDisabled)
 
 getCssListClass ()
 
 setCssListClass ($cssListClass)
 
 getCssItemClass ()
 
 getCssHandleClass ()
 
 setCssHandleClass ($cssHandleClass)
 
 setCssItemClass ($cssItemClass)
 
 getHtmlListTag ()
 
 setHtmlListTag ($htmlListTag)
 
 getListTpl ()
 
 setListTpl ($listTpl)
 
 render ($a_mode="")
 
 onCheckInput ()
 
 getHTML ()
 
- Public Member Functions inherited from ilIdentifiedMultiValuesInputGUI
 __construct ($a_title="", $a_postvar="")
 
 getElementAddCmd ()
 
 setElementAddCmd ($elementAddCmd)
 
 getElementRemoveCmd ()
 
 setElementRemoveCmd ($elementRemoveCmd)
 
 getElementMoveUpCommand ()
 
 setElementMoveUpCommand ($elementMoveUpCommand)
 
 getElementMoveDownCommand ()
 
 setElementMoveDownCommand ($elementMoveDownCommand)
 
 setValues ($values)
 
 getValues ()
 
 setValue ($value)
 
 getValue ()
 
 setMultiValues (array $values)
 
 getMultiValues ()
 
 setIdentifiedMultiValues ($values)
 
 getIdentifiedMultiValues ()
 
 setValueByArray ($a_values)
 
 checkInput ()
 
 onCheckInput ()
 
 prepareReprintable (assQuestion $question)
 
- Public Member Functions inherited from ilTextInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setValidationFailureMessage ($a_msg)
 Set message string for validation failure. More...
 
 getValidationFailureMessage ()
 
 setValidationRegexp ($a_value)
 Set validation regexp. More...
 
 getValidationRegexp ()
 Get validation regexp. More...
 
 setMaxLength ($a_maxlength)
 Set Max Length. More...
 
 getMaxLength ()
 Get Max Length. More...
 
 setSize ($a_size)
 Set Size. More...
 
 setInlineStyle ($a_style)
 Set inline style. More...
 
 getInlineStyle ()
 Get inline style. More...
 
 setCssClass ($a_class)
 
 getCssClass ()
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 getSize ()
 Get Size. More...
 
 setSuffix ($a_value)
 Set suffix. More...
 
 getSuffix ()
 Get suffix. More...
 
 setInputType ($a_type)
 set input type More...
 
 getInputType ()
 get input type More...
 
 setSubmitFormOnEnter ($a_val)
 Set submit form on enter. More...
 
 getSubmitFormOnEnter ()
 Get submit form on enter. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getDataSource ()
 get datasource link for js autocomplete More...
 
 setDataSource ($href, $a_delimiter=null)
 set datasource link for js autocomplete More...
 
 setDataSourceSubmitOnSelection ($a_stat)
 
 getDataSourceSubmitOnSelection ()
 
 setDataSourceSubmitUrl ($a_url)
 
 getDataSourceSubmitUrl ()
 
 setMultiValues (array $a_values)
 
 insert ($a_tpl)
 Insert property html. More...
 
 getTableFilterHTML ()
 Get HTML for table filter. More...
 
 getToolbarHTML ()
 Get HTML for toolbar. More...
 
 setDisableHtmlAutoComplete ($autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem. More...
 
 getSubItems ()
 Get Subitems. More...
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 Get sub form html. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 

Data Fields

const CONTEXT_QUESTION_PREVIEW = 'QuestionPreview'
 
const CONTEXT_CORRECT_SOLUTION_PRESENTATION = 'CorrectSolutionPresent'
 
const CONTEXT_USER_SOLUTION_PRESENTATION = 'UserSolutionPresent'
 
const CONTEXT_USER_SOLUTION_SUBMISSION = 'UserSolutionSubmit'
 
const ILC_CSS_CLASS_LIST = 'ilc_qordul_OrderList'
 
const ILC_CSS_CLASS_ITEM = 'ilc_qordli_OrderListItem'
 
const ILC_CSS_CLASS_HANDLE = 'ilc_qanswer_Answer'
 
const DEFAULT_THUMBNAIL_PREFIX = 'thumb.'
 
const CORRECTNESS_ICON_TRUE = 'icon_ok.svg'
 
const CORRECTNESS_LNGVAR_TRUE = 'answer_is_right'
 
const CORRECTNESS_ICON_FALSE = 'icon_not_ok.svg'
 
const CORRECTNESS_LNGVAR_FALSE = 'answer_is_wrong'
 
- Data Fields inherited from ilMultipleNestedOrderingElementsInputGUI
const HTML_LIST_TAG_UL = 'ul'
 
const HTML_LIST_TAG_OL = 'ol'
 
const CSS_LIST_CLASS = 'dd-list'
 
const CSS_ITEM_CLASS = 'dd-item'
 
const CSS_HANDLE_CLASS = 'dd-handle'
 
const POSTVAR_SUBFIELD_NEST_ELEM = 'content'
 
const POSTVAR_SUBFIELD_NEST_INDENT = 'indentation'
 
const DEFAULT_INSTANCE_ID = 'default'
 
- Data Fields inherited from ilIdentifiedMultiValuesInputGUI
const ELEMENT_DEFAULT_ADD_CMD = 'addElement'
 
const ELEMENT_DEFAULT_REMOVE_CMD = 'removeElement'
 
const ELEMENT_DEFAULT_MOVE_UP_CMD = 'moveUpElement'
 
const ELEMENT_DEFAULT_MOVE_DOWN_CMD = 'moveDownElement'
 

Protected Member Functions

 getCorrectness ($identifier)
 
 getItemTemplate ()
 
 getThumbnailFilename ($element)
 
 getThumbnailSource ($element)
 
 getItemHtml ($element, $identifier, $position, $itemSubFieldPostVar, $itemSubFieldId)
 
 getCurrentIndentation ($elementValues, $elementCounter)
 
 getNextIndentation ($elementValues, $elementCounter)
 
- Protected Member Functions inherited from ilMultipleNestedOrderingElementsInputGUI
 isStylingEnabled ()
 
 getGlobalTpl ()
 
 initListTemplate ()
 
 fetchListHtml ()
 
 renderListContainer ()
 
 renderListSnippet ()
 
 renderListItem ($value, $identifier, $position)
 
 getItemHtml ($value, $identifier, $position, $itemSubFieldPostVar, $itemSubFieldId)
 
 renderBeginListItem ($identifier)
 
 renderEndListItem ()
 
 renderBeginSubList ()
 
 renderEndSubList ()
 
 getCurrentIndentation ($elementValues, $elementCounter)
 
 getNextIndentation ($elementValues, $elementCounter)
 
 renderMainList ()
 
 renderJsInit ()
 
- Protected Member Functions inherited from ilIdentifiedMultiValuesInputGUI
 getMultiValueSubFieldId ($identifier, $subFieldIndex)
 
 getMultiValuePosIndexedFieldId ($identifier, $positionIndex)
 
 getMultiValuePosIndexedSubFieldId ($identifier, $subFieldIndex, $positionIndex)
 
 getFieldIdFromPostVar ($tempPostVar)
 
 getPostVarSubField ($subFieldIndex)
 
 getMultiValuePostVarSubField ($identifier, $subFieldIndex)
 
 getMultiValuePostVarSubFieldPosIndexed ($identifier, $subFieldIndex, $positionIndex)
 
 getMultiValuePostVarPosIndexed ($identifier, $positionIndex)
 
 getMultiValuePostVar ($identifier)
 
 buildMultiValueSubmitVar ($identifier, $positionIndex, $submitCommand)
 
 setIdentifiedMultiValuesByArray ($a_values)
 
 prepareMultiValuesInput ($values)
 
 prepareMultiValuesSubmit ($values)
 
 getFormValuesManipulators ()
 
 addFormValuesManipulator (ilFormValuesManipulator $manipulator)
 
 getSubFieldCompletedPostVar ($subFieldIndex, $elemPostVar)
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Protected Attributes

 $context = null
 
 $uniquePrefix = null
 
 $orderingType = null
 
 $thumbnailFilenamePrefix = self::DEFAULT_THUMBNAIL_PREFIX
 
 $elementImagePath = null
 
 $correctnessIcons
 
 $correctnessLngVars
 
 $showCorrectnessIconsEnabled = false
 
 $correctnessTrueElementList = null
 
- Protected Attributes inherited from ilMultipleNestedOrderingElementsInputGUI
 $instanceId = self::DEFAULT_INSTANCE_ID
 
 $interactionEnabled = true
 
 $nestingEnabled = true
 
 $stylingDisabled = false
 
 $listTpl = null
 
 $cssListClass = self::CSS_LIST_CLASS
 
 $cssItemClass = self::CSS_ITEM_CLASS
 
 $cssHandleClass = self::CSS_HANDLE_CLASS
 
 $htmlListTag = self::HTML_LIST_TAG_OL
 
- Protected Attributes inherited from ilIdentifiedMultiValuesInputGUI
 $elementAddCmd = self::ELEMENT_DEFAULT_ADD_CMD
 
 $elementRemoveCmd = self::ELEMENT_DEFAULT_REMOVE_CMD
 
 $elementMoveUpCommand = self::ELEMENT_DEFAULT_MOVE_UP_CMD
 
 $elementMoveDownCommand = self::ELEMENT_DEFAULT_MOVE_DOWN_CMD
 
 $identified_multi_values = array()
 
 $formValuesManipulationChain = array()
 
- Protected Attributes inherited from ilTextInputGUI
 $value
 
 $maxlength = 200
 
 $size = 40
 
 $validationRegexp
 
 $validationFailureMessage = ''
 
 $suffix
 
 $style_css
 
 $css_class
 
 $ajax_datasource
 
 $ajax_datasource_delimiter
 
 $ajax_datasource_commit = false
 
 $ajax_datasource_commit_url
 
 $submit_form_on_enter = false
 
 $autocomplete_disabled = false
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
 $ctrl
 
 $lng
 
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAssNestedOrderingElementsInputGUI::__construct ( ilAssOrderingFormValuesObjectsConverter  $converter,
  $postVar 
)

ilAssNestedOrderingElementsInputGUI constructor.

Parameters
ilAssOrderingFormValuesObjectsConverter$converter
string$postVar

Definition at line 86 of file class.ilAssNestedOrderingElementsInputGUI.php.

References ilIdentifiedMultiValuesInputGUI\addFormValuesManipulator(), ilMultipleNestedOrderingElementsInputGUI\getCssHandleClass(), ilMultipleNestedOrderingElementsInputGUI\getCssItemClass(), ilMultipleNestedOrderingElementsInputGUI\getCssListClass(), ilMultipleNestedOrderingElementsInputGUI\setCssHandleClass(), ilMultipleNestedOrderingElementsInputGUI\setCssItemClass(), ilMultipleNestedOrderingElementsInputGUI\setCssListClass(), and ilMultipleNestedOrderingElementsInputGUI\setHtmlListTag().

87  {
88  require_once 'Modules/TestQuestionPool/classes/forms/class.ilAssOrderingDefaultElementFallback.php';
89  $manipulator = new ilAssOrderingDefaultElementFallback();
90  $this->addFormValuesManipulator($manipulator);
91 
92  parent::__construct('', $postVar);
93 
94  $this->addFormValuesManipulator($converter);
95 
96  $this->setHtmlListTag(parent::HTML_LIST_TAG_UL);
97  $this->setCssListClass($this->getCssListClass() . ' ' . self::ILC_CSS_CLASS_LIST);
98  $this->setCssItemClass($this->getCssItemClass() . ' ' . self::ILC_CSS_CLASS_ITEM);
99  $this->setCssHandleClass($this->getCssHandleClass() . ' ' . self::ILC_CSS_CLASS_HANDLE);
100  }
addFormValuesManipulator(ilFormValuesManipulator $manipulator)
+ Here is the call graph for this function:

Member Function Documentation

◆ getContext()

ilAssNestedOrderingElementsInputGUI::getContext ( )
Returns
string

Definition at line 146 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $context.

Referenced by getInstanceId().

+ Here is the caller graph for this function:

◆ getCorrectness()

ilAssNestedOrderingElementsInputGUI::getCorrectness (   $identifier)
protected
Parameters
$identifier
Returns
bool

Definition at line 305 of file class.ilAssNestedOrderingElementsInputGUI.php.

References getCorrectnessTrueElementList().

Referenced by getItemHtml().

306  {
307  return $this->getCorrectnessTrueElementList()->elementExistByRandomIdentifier($identifier);
308  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCorrectnessIconFilename()

ilAssNestedOrderingElementsInputGUI::getCorrectnessIconFilename (   $correctness)
Parameters
bool$correctness
Returns
string

Definition at line 243 of file class.ilAssNestedOrderingElementsInputGUI.php.

Referenced by getItemHtml().

244  {
245  return $this->correctnessIcons[(bool) $correctness];
246  }
+ Here is the caller graph for this function:

◆ getCorrectnessLangVar()

ilAssNestedOrderingElementsInputGUI::getCorrectnessLangVar (   $correctness)
Parameters
bool$correctness
Returns
string

Definition at line 261 of file class.ilAssNestedOrderingElementsInputGUI.php.

262  {
263  return $this->correctnessLngVars[(bool) $correctness];
264  }

◆ getCorrectnessText()

ilAssNestedOrderingElementsInputGUI::getCorrectnessText (   $correctness)
Parameters
bool$correctness
Returns
string

Definition at line 279 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $GLOBALS, and ilFormPropertyGUI\$lng.

Referenced by getItemHtml().

280  {
281  $lng = isset($GLOBALS['DIC']) ? $GLOBALS['DIC']['lng'] : $GLOBALS['lng'];
282  return $lng->txt($this->correctnessLngVars[(bool) $correctness]);
283  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
+ Here is the caller graph for this function:

◆ getCorrectnessTrueElementList()

ilAssNestedOrderingElementsInputGUI::getCorrectnessTrueElementList ( )
Returns
ilAssOrderingElementList

Definition at line 288 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $correctnessTrueElementList.

Referenced by getCorrectness().

+ Here is the caller graph for this function:

◆ getCurrentIndentation()

ilAssNestedOrderingElementsInputGUI::getCurrentIndentation (   $elementValues,
  $elementCounter 
)
protected
Parameters
array$elementValues
integer$elementCounter
Returns
integer $currentDepth

Definition at line 388 of file class.ilAssNestedOrderingElementsInputGUI.php.

389  {
390  if (!isset($elementValues[$elementCounter])) {
391  return 0;
392  }
393 
394  return $elementValues[$elementCounter]['ordering_indentation'];
395  }

◆ getElementImagePath()

ilAssNestedOrderingElementsInputGUI::getElementImagePath ( )
Returns
string

Definition at line 202 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $elementImagePath.

Referenced by getThumbnailSource().

+ Here is the caller graph for this function:

◆ getElementList()

ilAssNestedOrderingElementsInputGUI::getElementList (   $questionId)
Parameters
$questionId
Returns
ilAssOrderingElementList

Definition at line 114 of file class.ilAssNestedOrderingElementsInputGUI.php.

References ilAssOrderingElementList\buildInstance(), and ilIdentifiedMultiValuesInputGUI\getIdentifiedMultiValues().

Referenced by prepareReprintable().

115  {
116  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElementList.php';
118  }
static buildInstance($questionId, $orderingElements=array())
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstanceId()

ilAssNestedOrderingElementsInputGUI::getInstanceId ( )

Definition at line 134 of file class.ilAssNestedOrderingElementsInputGUI.php.

References getContext(), and getUniquePrefix().

135  {
136  if (!$this->getContext() || !$this->getUniquePrefix()) {
137  return parent::getInstanceId();
138  }
139 
140  return $this->getContext() . '_' . $this->getUniquePrefix();
141  }
+ Here is the call graph for this function:

◆ getItemHtml()

ilAssNestedOrderingElementsInputGUI::getItemHtml (   $element,
  $identifier,
  $position,
  $itemSubFieldPostVar,
  $itemSubFieldId 
)
protected
Parameters
ilAssOrderingElement$element
string$identifier
iunteger$position
string$itemSubFieldPostVar
string$itemSubFieldId
Returns
string

Definition at line 344 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $tpl, getCorrectness(), getCorrectnessIconFilename(), getCorrectnessText(), getItemTemplate(), getOrderingType(), getThumbnailFilename(), getThumbnailSource(), isShowCorrectnessIconsEnabled(), OQ_NESTED_PICTURES, OQ_NESTED_TERMS, OQ_PICTURES, OQ_TERMS, and ilUtil\prepareFormOutput().

345  {
346  $tpl = $this->getItemTemplate();
347 
348  switch ($this->getOrderingType()) {
349  case OQ_TERMS:
350  case OQ_NESTED_TERMS:
351 
352  $tpl->setCurrentBlock('item_text');
353  $tpl->setVariable("ITEM_CONTENT", ilUtil::prepareFormOutput($element['content']));
354  $tpl->parseCurrentBlock();
355  break;
356 
357  case OQ_PICTURES:
358  case OQ_NESTED_PICTURES:
359 
360  $tpl->setCurrentBlock('item_image');
361  $tpl->setVariable("ITEM_SOURCE", $this->getThumbnailSource($element));
362  $tpl->setVariable("ITEM_CONTENT", $this->getThumbnailFilename($element));
363  $tpl->parseCurrentBlock();
364  break;
365  }
366 
367  if ($this->isShowCorrectnessIconsEnabled()) {
368  $tpl->setCurrentBlock('correctness_icon');
369  $tpl->setVariable("ICON_SRC", $this->getCorrectnessIconFilename($this->getCorrectness($identifier)));
370  $tpl->setVariable("ICON_TEXT", $this->getCorrectnessText($this->getCorrectness($identifier)));
371  $tpl->parseCurrentBlock();
372  }
373 
374  $tpl->setCurrentBlock('item');
375  $tpl->setVariable("ITEM_ID", $itemSubFieldId);
376  $tpl->setVariable("ITEM_POSTVAR", $itemSubFieldPostVar);
377  $tpl->setVariable("ITEM_CONTENT", ilUtil::prepareFormOutput($element['content']));
378  $tpl->parseCurrentBlock();
379 
380  return $tpl->get();
381  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
$tpl
Definition: ilias.php:10
const OQ_NESTED_TERMS
const OQ_PICTURES
Ordering question constants.
const OQ_TERMS
const OQ_NESTED_PICTURES
+ Here is the call graph for this function:

◆ getItemTemplate()

ilAssNestedOrderingElementsInputGUI::getItemTemplate ( )
protected
Returns
ilTemplate

Definition at line 313 of file class.ilAssNestedOrderingElementsInputGUI.php.

Referenced by getItemHtml().

314  {
315  return new ilTemplate('tpl.prop_ass_nested_order_elem.html', true, true, 'Modules/TestQuestionPool');
316  }
special template class to simplify handling of ITX/PEAR
+ Here is the caller graph for this function:

◆ getNextIndentation()

ilAssNestedOrderingElementsInputGUI::getNextIndentation (   $elementValues,
  $elementCounter 
)
protected
Parameters
array$elementValues
integer$elementCounter
Returns
integer $nextDepth

Definition at line 402 of file class.ilAssNestedOrderingElementsInputGUI.php.

403  {
404  if (!isset($elementValues[$elementCounter + 1])) {
405  return 0;
406  }
407 
408  return $elementValues[$elementCounter + 1]['ordering_indentation'];
409  }

◆ getOrderingType()

ilAssNestedOrderingElementsInputGUI::getOrderingType ( )
Returns
mixed

Definition at line 186 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $orderingType.

Referenced by getItemHtml().

+ Here is the caller graph for this function:

◆ getThumbnailFilename()

ilAssNestedOrderingElementsInputGUI::getThumbnailFilename (   $element)
protected
Parameters
array$element
Returns
string

Definition at line 322 of file class.ilAssNestedOrderingElementsInputGUI.php.

References getThumbPrefix().

Referenced by getItemHtml(), and getThumbnailSource().

323  {
324  return $this->getThumbPrefix() . $element['content'];
325  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getThumbnailSource()

ilAssNestedOrderingElementsInputGUI::getThumbnailSource (   $element)
protected
Parameters
array$element
Returns
string

Definition at line 331 of file class.ilAssNestedOrderingElementsInputGUI.php.

References getElementImagePath(), and getThumbnailFilename().

Referenced by getItemHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getThumbPrefix()

ilAssNestedOrderingElementsInputGUI::getThumbPrefix ( )
Returns
string

Definition at line 218 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $thumbnailFilenamePrefix.

Referenced by getThumbnailFilename().

+ Here is the caller graph for this function:

◆ getUniquePrefix()

ilAssNestedOrderingElementsInputGUI::getUniquePrefix ( )
Returns
string

Definition at line 162 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $uniquePrefix.

Referenced by getInstanceId().

+ Here is the caller graph for this function:

◆ isPostSubmit()

ilAssNestedOrderingElementsInputGUI::isPostSubmit (   $data)

Definition at line 411 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $data, and ilFormPropertyGUI\getPostVar().

Referenced by assOrderingQuestion\getSolutionOrderingElementListForTestOutput().

412  {
413  if (!is_array($data)) {
414  return false;
415  }
416 
417  if (!isset($data[$this->getPostVar()])) {
418  return false;
419  }
420 
421  if (!count($data[$this->getPostVar()])) {
422  return false;
423  }
424 
425  return true;
426  }
getPostVar()
Get Post Variable.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isShowCorrectnessIconsEnabled()

ilAssNestedOrderingElementsInputGUI::isShowCorrectnessIconsEnabled ( )
Returns
bool

Definition at line 234 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $showCorrectnessIconsEnabled.

Referenced by getItemHtml().

+ Here is the caller graph for this function:

◆ prepareReprintable()

ilAssNestedOrderingElementsInputGUI::prepareReprintable ( assQuestion  $question)
Parameters
assOrderingQuestion$question

Definition at line 123 of file class.ilAssNestedOrderingElementsInputGUI.php.

References getElementList(), assQuestion\getId(), and setElementList().

124  {
125  $elementList = $this->getElementList($question->getId());
126 
127  $elementList->completeContentsFromElementList(
128  $question->getOrderingElementList()
129  );
130 
131  $this->setElementList($elementList);
132  }
getId()
Gets the id of the assQuestion object.
+ Here is the call graph for this function:

◆ setContext()

ilAssNestedOrderingElementsInputGUI::setContext (   $context)
Parameters
string$context

Definition at line 154 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $context.

◆ setCorrectnessIconFilename()

ilAssNestedOrderingElementsInputGUI::setCorrectnessIconFilename (   $correctness,
  $iconFilename 
)
Parameters
bool$correctness
string$iconFilename

Definition at line 252 of file class.ilAssNestedOrderingElementsInputGUI.php.

253  {
254  $this->correctnessIcons[(bool) $correctness] = $iconFilename;
255  }

◆ setCorrectnessLangVar()

ilAssNestedOrderingElementsInputGUI::setCorrectnessLangVar (   $correctness,
  $langVar 
)
Parameters
bool$correctness
string$langVar

Definition at line 270 of file class.ilAssNestedOrderingElementsInputGUI.php.

271  {
272  $this->correctnessLngVars[(bool) $correctness] = $langVar;
273  }

◆ setCorrectnessTrueElementList()

ilAssNestedOrderingElementsInputGUI::setCorrectnessTrueElementList ( ilAssOrderingElementList  $correctnessTrueElementList)
Parameters
ilAssOrderingElementList$correctnessTrueElementList

Definition at line 296 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $correctnessTrueElementList.

297  {
298  $this->correctnessTrueElementList = $correctnessTrueElementList;
299  }

◆ setElementImagePath()

ilAssNestedOrderingElementsInputGUI::setElementImagePath (   $elementImagePath)
Parameters
string$elementImagePath

Definition at line 194 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $elementImagePath.

195  {
196  $this->elementImagePath = $elementImagePath;
197  }

◆ setElementList()

ilAssNestedOrderingElementsInputGUI::setElementList ( ilAssOrderingElementList  $elementList)
Parameters
ilAssOrderingElementList$elementList

Definition at line 105 of file class.ilAssNestedOrderingElementsInputGUI.php.

References ilAssOrderingElementList\getRandomIdentifierIndexedElements(), and ilIdentifiedMultiValuesInputGUI\setIdentifiedMultiValues().

Referenced by prepareReprintable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setOrderingType()

ilAssNestedOrderingElementsInputGUI::setOrderingType (   $orderingType)
Parameters
mixed$orderingType

Definition at line 178 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $orderingType.

◆ setShowCorrectnessIconsEnabled()

ilAssNestedOrderingElementsInputGUI::setShowCorrectnessIconsEnabled (   $showCorrectnessIconsEnabled)
Parameters
$showCorrectnessIconsEnabled

Definition at line 226 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $showCorrectnessIconsEnabled.

227  {
228  $this->showCorrectnessIconsEnabled = $showCorrectnessIconsEnabled;
229  }

◆ setThumbPrefix()

ilAssNestedOrderingElementsInputGUI::setThumbPrefix (   $thumbnailFilenamePrefix)
Parameters
string$thumbnailFilenamePrefix

Definition at line 210 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $thumbnailFilenamePrefix.

211  {
212  $this->thumbnailFilenamePrefix = $thumbnailFilenamePrefix;
213  }

◆ setUniquePrefix()

ilAssNestedOrderingElementsInputGUI::setUniquePrefix (   $uniquePrefix)
Parameters
string$uniquePrefix

Definition at line 170 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $uniquePrefix.

Field Documentation

◆ $context

ilAssNestedOrderingElementsInputGUI::$context = null
protected

Definition at line 26 of file class.ilAssNestedOrderingElementsInputGUI.php.

Referenced by getContext(), and setContext().

◆ $correctnessIcons

ilAssNestedOrderingElementsInputGUI::$correctnessIcons
protected
Initial value:
true => self::CORRECTNESS_ICON_TRUE, false => self::CORRECTNESS_ICON_FALSE
)

Definition at line 59 of file class.ilAssNestedOrderingElementsInputGUI.php.

◆ $correctnessLngVars

ilAssNestedOrderingElementsInputGUI::$correctnessLngVars
protected
Initial value:
true => self::CORRECTNESS_LNGVAR_TRUE, false => self::CORRECTNESS_LNGVAR_FALSE
)

Definition at line 66 of file class.ilAssNestedOrderingElementsInputGUI.php.

◆ $correctnessTrueElementList

ilAssNestedOrderingElementsInputGUI::$correctnessTrueElementList = null
protected

◆ $elementImagePath

ilAssNestedOrderingElementsInputGUI::$elementImagePath = null
protected

◆ $orderingType

ilAssNestedOrderingElementsInputGUI::$orderingType = null
protected

◆ $showCorrectnessIconsEnabled

ilAssNestedOrderingElementsInputGUI::$showCorrectnessIconsEnabled = false
protected

◆ $thumbnailFilenamePrefix

ilAssNestedOrderingElementsInputGUI::$thumbnailFilenamePrefix = self::DEFAULT_THUMBNAIL_PREFIX
protected

Definition at line 43 of file class.ilAssNestedOrderingElementsInputGUI.php.

Referenced by getThumbPrefix(), and setThumbPrefix().

◆ $uniquePrefix

ilAssNestedOrderingElementsInputGUI::$uniquePrefix = null
protected

◆ CONTEXT_CORRECT_SOLUTION_PRESENTATION

const ilAssNestedOrderingElementsInputGUI::CONTEXT_CORRECT_SOLUTION_PRESENTATION = 'CorrectSolutionPresent'

◆ CONTEXT_QUESTION_PREVIEW

const ilAssNestedOrderingElementsInputGUI::CONTEXT_QUESTION_PREVIEW = 'QuestionPreview'

◆ CONTEXT_USER_SOLUTION_PRESENTATION

const ilAssNestedOrderingElementsInputGUI::CONTEXT_USER_SOLUTION_PRESENTATION = 'UserSolutionPresent'

◆ CONTEXT_USER_SOLUTION_SUBMISSION

const ilAssNestedOrderingElementsInputGUI::CONTEXT_USER_SOLUTION_SUBMISSION = 'UserSolutionSubmit'

◆ CORRECTNESS_ICON_FALSE

const ilAssNestedOrderingElementsInputGUI::CORRECTNESS_ICON_FALSE = 'icon_not_ok.svg'

◆ CORRECTNESS_ICON_TRUE

const ilAssNestedOrderingElementsInputGUI::CORRECTNESS_ICON_TRUE = 'icon_ok.svg'

◆ CORRECTNESS_LNGVAR_FALSE

const ilAssNestedOrderingElementsInputGUI::CORRECTNESS_LNGVAR_FALSE = 'answer_is_wrong'

◆ CORRECTNESS_LNGVAR_TRUE

const ilAssNestedOrderingElementsInputGUI::CORRECTNESS_LNGVAR_TRUE = 'answer_is_right'

◆ DEFAULT_THUMBNAIL_PREFIX

const ilAssNestedOrderingElementsInputGUI::DEFAULT_THUMBNAIL_PREFIX = 'thumb.'

◆ ILC_CSS_CLASS_HANDLE

const ilAssNestedOrderingElementsInputGUI::ILC_CSS_CLASS_HANDLE = 'ilc_qanswer_Answer'

◆ ILC_CSS_CLASS_ITEM

const ilAssNestedOrderingElementsInputGUI::ILC_CSS_CLASS_ITEM = 'ilc_qordli_OrderListItem'

◆ ILC_CSS_CLASS_LIST

const ilAssNestedOrderingElementsInputGUI::ILC_CSS_CLASS_LIST = 'ilc_qordul_OrderList'

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