ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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
 $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 147 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 306 of file class.ilAssNestedOrderingElementsInputGUI.php.

References getCorrectnessTrueElementList().

Referenced by getItemHtml().

307  {
308  return $this->getCorrectnessTrueElementList()->elementExistByRandomIdentifier($identifier);
309  }
+ 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 244 of file class.ilAssNestedOrderingElementsInputGUI.php.

Referenced by getItemHtml().

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

◆ getCorrectnessLangVar()

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

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

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

◆ getCorrectnessText()

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

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

References $GLOBALS, and $lng.

Referenced by getItemHtml().

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

◆ getCorrectnessTrueElementList()

ilAssNestedOrderingElementsInputGUI::getCorrectnessTrueElementList ( )
Returns
ilAssOrderingElementList

Definition at line 289 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 391 of file class.ilAssNestedOrderingElementsInputGUI.php.

392  {
393  if( !isset($elementValues[$elementCounter]) )
394  {
395  return 0;
396  }
397 
398  return $elementValues[$elementCounter]['ordering_indentation'];
399  }

◆ getElementImagePath()

ilAssNestedOrderingElementsInputGUI::getElementImagePath ( )
Returns
string

Definition at line 203 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  {
138  return parent::getInstanceId();
139  }
140 
141  return $this->getContext() . '_' . $this->getUniquePrefix();
142  }
+ 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 345 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().

346  {
347  $tpl = $this->getItemTemplate();
348 
349  switch( $this->getOrderingType() )
350  {
351  case OQ_TERMS:
352  case OQ_NESTED_TERMS:
353 
354  $tpl->setCurrentBlock('item_text');
355  $tpl->setVariable("ITEM_CONTENT", ilUtil::prepareFormOutput($element['content']));
356  $tpl->parseCurrentBlock();
357  break;
358 
359  case OQ_PICTURES:
360  case OQ_NESTED_PICTURES:
361 
362  $tpl->setCurrentBlock('item_image');
363  $tpl->setVariable("ITEM_SOURCE", $this->getThumbnailSource($element));
364  $tpl->setVariable("ITEM_CONTENT", $this->getThumbnailFilename($element));
365  $tpl->parseCurrentBlock();
366  break;
367  }
368 
369  if( $this->isShowCorrectnessIconsEnabled() )
370  {
371  $tpl->setCurrentBlock('correctness_icon');
372  $tpl->setVariable("ICON_SRC", $this->getCorrectnessIconFilename( $this->getCorrectness($identifier) ));
373  $tpl->setVariable("ICON_TEXT", $this->getCorrectnessText( $this->getCorrectness($identifier) ));
374  $tpl->parseCurrentBlock();
375  }
376 
377  $tpl->setCurrentBlock('item');
378  $tpl->setVariable("ITEM_ID", $itemSubFieldId);
379  $tpl->setVariable("ITEM_POSTVAR", $itemSubFieldPostVar);
380  $tpl->setVariable("ITEM_CONTENT", ilUtil::prepareFormOutput($element['content']));
381  $tpl->parseCurrentBlock();
382 
383  return $tpl->get();
384  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
const OQ_NESTED_TERMS
global $tpl
Definition: ilias.php:8
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 314 of file class.ilAssNestedOrderingElementsInputGUI.php.

Referenced by getItemHtml().

315  {
316  return new ilTemplate('tpl.prop_ass_nested_order_elem.html', true, true, 'Modules/TestQuestionPool');
317  }
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 406 of file class.ilAssNestedOrderingElementsInputGUI.php.

407  {
408  if( !isset($elementValues[$elementCounter + 1]) )
409  {
410  return 0;
411  }
412 
413  return $elementValues[$elementCounter + 1]['ordering_indentation'];
414  }

◆ getOrderingType()

ilAssNestedOrderingElementsInputGUI::getOrderingType ( )
Returns
mixed

Definition at line 187 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 323 of file class.ilAssNestedOrderingElementsInputGUI.php.

References getThumbPrefix().

Referenced by getItemHtml(), and getThumbnailSource().

324  {
325  return $this->getThumbPrefix() . $element['content'];
326  }
+ 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 332 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 219 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 163 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 416 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $data, and ilFormPropertyGUI\getPostVar().

Referenced by assOrderingQuestion\getSolutionOrderingElementListForTestOutput().

417  {
418  if( !is_array($data) )
419  {
420  return false;
421  }
422 
423  if( !isset($data[$this->getPostVar()]) )
424  {
425  return false;
426  }
427 
428  if( !count($data[$this->getPostVar()]) )
429  {
430  return false;
431  }
432 
433  return true;
434  }
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 235 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 155 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $context.

◆ setCorrectnessIconFilename()

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

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

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

◆ setCorrectnessLangVar()

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

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

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

◆ setCorrectnessTrueElementList()

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

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

References $correctnessTrueElementList.

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

◆ setElementImagePath()

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

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

References $elementImagePath.

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

◆ 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 179 of file class.ilAssNestedOrderingElementsInputGUI.php.

References $orderingType.

◆ setShowCorrectnessIconsEnabled()

ilAssNestedOrderingElementsInputGUI::setShowCorrectnessIconsEnabled (   $showCorrectnessIconsEnabled)
Parameters
$showCorrectnessIconsEnabled

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

References $showCorrectnessIconsEnabled.

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

◆ setThumbPrefix()

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

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

References $thumbnailFilenamePrefix.

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

◆ setUniquePrefix()

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

Definition at line 171 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: