ILIAS  release_7 Revision v7.30-3-g800a261c036
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)
 
 getCorrectnessText ($correctness)
 
 getCorrectnessTrueElementList ()
 
 setCorrectnessTrueElementList (ilAssOrderingElementList $correctnessTrueElementList)
 
 isPostSubmit ($data)
 
- Public Member Functions inherited from ilMultipleNestedOrderingElementsInputGUI
 __construct ($a_title='', $a_postvar='')
 Constructor. More...
 
 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="")
 Constructor. More...
 
 getElementAddCmd ()
 
 setElementAddCmd ($elementAddCmd)
 
 getElementRemoveCmd ()
 
 setElementRemoveCmd ($elementRemoveCmd)
 
 getElementMoveUpCommand ()
 
 setElementMoveUpCommand ($elementMoveUpCommand)
 
 getElementMoveDownCommand ()
 
 setElementMoveDownCommand ($elementMoveDownCommand)
 
 setValues ($values)
 
 getValues ()
 
 setValue ($value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setMultiValues (array $values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 setIdentifiedMultiValues ($values)
 
 getIdentifiedMultiValues ()
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 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)
 Set multi values. More...
 
 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...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value for filter. More...
 
 getFormLabelFor ()
 Get label "for" attribute value for form. More...
 
- Public Member Functions inherited from ilTableFilterItem
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. 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 DEFAULT_THUMBNAIL_PREFIX = 'thumb.'
 
- 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 = 'il-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
 
 $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 65 of file class.ilAssNestedOrderingElementsInputGUI.php.

66 {
67 require_once 'Modules/TestQuestionPool/classes/forms/class.ilAssOrderingDefaultElementFallback.php';
68 $manipulator = new ilAssOrderingDefaultElementFallback();
69 $this->addFormValuesManipulator($manipulator);
70
71 parent::__construct('', $postVar);
72
73 $this->addFormValuesManipulator($converter);
74
75 $this->setHtmlListTag(parent::HTML_LIST_TAG_UL);
76 $this->setCssListClass($this->getCssListClass() . ' ' . self::ILC_CSS_CLASS_LIST);
77 $this->setCssItemClass($this->getCssItemClass() . ' ' . self::ILC_CSS_CLASS_ITEM);
78 $this->setCssHandleClass($this->getCssHandleClass());
79 }
addFormValuesManipulator(ilFormValuesManipulator $manipulator)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getContext()

ilAssNestedOrderingElementsInputGUI::getContext ( )
Returns
string

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

266 {
267 return $this->getCorrectnessTrueElementList()->elementExistByRandomIdentifier($identifier);
268 }

References getCorrectnessTrueElementList().

Referenced by getItemHtml().

+ 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 222 of file class.ilAssNestedOrderingElementsInputGUI.php.

223 {
224 if((bool) $correctness){
225 return ilUtil::getImagePath('icon_ok.svg');
226 }
227 return ilUtil::getImagePath('icon_not_ok.svg');
228 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References ilUtil\getImagePath().

Referenced by getItemHtml().

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

◆ getCorrectnessText()

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

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

235 {
236 global $DIC; /* @var ILIAS\DI\Container $DIC */
237 $lng = $DIC['lng'];
238 if ((bool) $correctness){
239 return $lng->txt('answer_is_right');
240 }
241 return $lng->txt('answer_is_wrong');
242
243 }
global $DIC
Definition: goto.php:24

References $DIC, and ilFormPropertyGUI\$lng.

Referenced by getItemHtml().

+ Here is the caller graph for this function:

◆ getCorrectnessTrueElementList()

ilAssNestedOrderingElementsInputGUI::getCorrectnessTrueElementList ( )
Returns
ilAssOrderingElementList

Definition at line 248 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

Reimplemented from ilMultipleNestedOrderingElementsInputGUI.

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

350 {
351 if (!isset($elementValues[$elementCounter])) {
352 return 0;
353 }
354
355 return $elementValues[$elementCounter]['ordering_indentation'];
356 }

◆ getElementImagePath()

ilAssNestedOrderingElementsInputGUI::getElementImagePath ( )
Returns
string

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

94 {
95 require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElementList.php';
97 }
static buildInstance(int $question_id, array $elements=[])

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

Referenced by prepareReprintable().

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

◆ getInstanceId()

ilAssNestedOrderingElementsInputGUI::getInstanceId ( )

Reimplemented from ilMultipleNestedOrderingElementsInputGUI.

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

114 {
115 if (!$this->getContext() || !$this->getUniquePrefix()) {
116 return parent::getInstanceId();
117 }
118
119 return $this->getContext() . '_' . $this->getUniquePrefix();
120 }

References getContext(), and getUniquePrefix().

+ 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

Reimplemented from ilMultipleNestedOrderingElementsInputGUI.

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

305 {
306 $tpl = $this->getItemTemplate();
307
308 switch ($this->getOrderingType()) {
311
312 $tpl->setCurrentBlock('item_text');
313 $tpl->setVariable("ITEM_CONTENT", ilUtil::prepareFormOutput($element['content']));
314 $tpl->parseCurrentBlock();
315 break;
316
319
320 $tpl->setCurrentBlock('item_image');
321 $tpl->setVariable("ITEM_SOURCE", $this->getThumbnailSource($element));
322 $tpl->setVariable("ITEM_CONTENT", $this->getThumbnailFilename($element));
323 $tpl->parseCurrentBlock();
324 break;
325 }
326
327 if ($this->isShowCorrectnessIconsEnabled()) {
328 $tpl->setCurrentBlock('correctness_icon');
329 $correctness = $this->getCorrectness($element['random_id']);
330 $tpl->setVariable("ICON_SRC", $this->getCorrectnessIconFilename($correctness));
331 $tpl->setVariable("ICON_TEXT", $this->getCorrectnessText($correctness));
332 $tpl->parseCurrentBlock();
333 }
334
335 $tpl->setCurrentBlock('item');
336 $tpl->setVariable("ITEM_ID", $itemSubFieldId);
337 $tpl->setVariable("ITEM_POSTVAR", $itemSubFieldPostVar);
338 $tpl->setVariable("ITEM_CONTENT", ilUtil::prepareFormOutput($element['content']));
339 $tpl->parseCurrentBlock();
340
341 return $tpl->get();
342 }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41

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

+ Here is the call graph for this function:

◆ getItemTemplate()

ilAssNestedOrderingElementsInputGUI::getItemTemplate ( )
protected
Returns
ilTemplate

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

274 {
275 return new ilTemplate('tpl.prop_ass_nested_order_elem.html', true, true, 'Modules/TestQuestionPool');
276 }
special template class to simplify handling of ITX/PEAR

Referenced by getItemHtml().

+ Here is the caller graph for this function:

◆ getNextIndentation()

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

Reimplemented from ilMultipleNestedOrderingElementsInputGUI.

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

364 {
365 if (!isset($elementValues[$elementCounter + 1])) {
366 return 0;
367 }
368
369 return $elementValues[$elementCounter + 1]['ordering_indentation'];
370 }

◆ getOrderingType()

ilAssNestedOrderingElementsInputGUI::getOrderingType ( )
Returns
mixed

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

283 {
284 return $this->getThumbPrefix() . $element['content'];
285 }

References getThumbPrefix().

Referenced by getItemHtml(), and getThumbnailSource().

+ 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 291 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 197 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 141 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 372 of file class.ilAssNestedOrderingElementsInputGUI.php.

373 {
374 if (!is_array($data)) {
375 return false;
376 }
377
378 if (!isset($data[$this->getPostVar()])) {
379 return false;
380 }
381
382 if (!count($data[$this->getPostVar()])) {
383 return false;
384 }
385
386 return true;
387 }
getPostVar()
Get Post Variable.
$data
Definition: storeScorm.php:23

References $data, and ilFormPropertyGUI\getPostVar().

Referenced by assOrderingQuestion\getSolutionOrderingElementListForTestOutput().

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

◆ isShowCorrectnessIconsEnabled()

ilAssNestedOrderingElementsInputGUI::isShowCorrectnessIconsEnabled ( )
Returns
bool

Definition at line 213 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

Reimplemented from ilIdentifiedMultiValuesInputGUI.

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

103 {
104 $elementList = $this->getElementList($question->getId());
105
106 $elementList->completeContentsFromElementList(
107 $question->getOrderingElementList()
108 );
109
110 $this->setElementList($elementList);
111 }
getId()
Gets the id of the assQuestion object.

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

+ Here is the call graph for this function:

◆ setContext()

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

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

134 {
135 $this->context = $context;
136 }

References $context.

◆ setCorrectnessTrueElementList()

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

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

257 {
258 $this->correctnessTrueElementList = $correctnessTrueElementList;
259 }

References $correctnessTrueElementList.

◆ setElementImagePath()

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

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

174 {
175 $this->elementImagePath = $elementImagePath;
176 }

References $elementImagePath.

◆ setElementList()

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

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

158 {
159 $this->orderingType = $orderingType;
160 }

References $orderingType.

◆ setShowCorrectnessIconsEnabled()

ilAssNestedOrderingElementsInputGUI::setShowCorrectnessIconsEnabled (   $showCorrectnessIconsEnabled)
Parameters
$showCorrectnessIconsEnabled

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

206 {
207 $this->showCorrectnessIconsEnabled = $showCorrectnessIconsEnabled;
208 }

References $showCorrectnessIconsEnabled.

◆ setThumbPrefix()

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

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

190 {
191 $this->thumbnailFilenamePrefix = $thumbnailFilenamePrefix;
192 }

References $thumbnailFilenamePrefix.

◆ setUniquePrefix()

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

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

150 {
151 $this->uniquePrefix = $uniquePrefix;
152 }

References $uniquePrefix.

Field Documentation

◆ $context

ilAssNestedOrderingElementsInputGUI::$context = null
protected

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

Referenced by getContext(), and setContext().

◆ $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 42 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'

◆ DEFAULT_THUMBNAIL_PREFIX

const ilAssNestedOrderingElementsInputGUI::DEFAULT_THUMBNAIL_PREFIX = 'thumb.'

◆ 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: