ILIAS  release_8 Revision v8.24
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 ()
 
 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 (string $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 (array $a_values)
 
 getInput ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 onCheckInput ()
 
 prepareReprintable (assQuestion $question)
 
- Public Member Functions inherited from ilTextInputGUI
 __construct (string $a_title="", string $a_postvar="")
 
 setValue ($a_value)
 
 getValue ()
 
 setValidationFailureMessage (string $a_msg)
 
 getValidationFailureMessage ()
 
 setValidationRegexp (string $a_value)
 
 getValidationRegexp ()
 
 setMaxLength (?int $a_maxlength)
 
 getMaxLength ()
 
 setSize (int $a_size)
 
 setInlineStyle (string $a_style)
 
 getInlineStyle ()
 
 setCssClass (string $a_class)
 
 getCssClass ()
 
 setValueByArray (array $a_values)
 
 getSize ()
 
 setSuffix (string $a_value)
 
 getSuffix ()
 
 setInputType (string $a_type)
 set input type More...
 
 getInputType ()
 
 setSubmitFormOnEnter (bool $a_val)
 
 getSubmitFormOnEnter ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getInput ()
 
 getDataSource ()
 
 setDataSource (string $href, string $a_delimiter=null)
 
 setDataSourceSubmitOnSelection (bool $a_stat)
 
 getDataSourceSubmitOnSelection ()
 
 setDataSourceSubmitUrl (string $a_url)
 
 getDataSourceSubmitUrl ()
 
 setMultiValues (array $a_values)
 
 render (string $a_mode="")
 
 insert (ilTemplate $a_tpl)
 
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 
 setDisableHtmlAutoComplete (bool $autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
 getPostValueForComparison ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem (ilFormPropertyGUI $a_item)
 
 getSubItems ()
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct (string $a_title="", string $a_postvar="")
 
 executeCommand ()
 
 getType ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setPostVar (string $a_postvar)
 
 getPostVar ()
 
 getFieldId ()
 
 setInfo (string $a_info)
 
 getInfo ()
 
 setAlert (string $a_alert)
 
 getAlert ()
 
 setRequired (bool $a_required)
 
 getRequired ()
 
 setDisabled (bool $a_disabled)
 
 getDisabled ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm (ilPropertyFormGUI $a_parentform)
 
 getParentForm ()
 
 setParent (ilFormPropertyGUI $a_val)
 
 getParent ()
 
 getSubForm ()
 
 hideSubForm ()
 
 setHiddenTitle (string $a_val)
 
 getHiddenTitle ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
 serializeData ()
 
 unserializeData (string $a_data)
 
 setParentTable ($a_val)
 Set parent table. More...
 
 getParentTable ()
 Get parent table. More...
 
 writeToSession ()
 
 clearFromSession ()
 
 readFromSession ()
 
 getHiddenTag (string $a_post_var, string $a_value)
 
 setMulti (bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
 
 getMulti ()
 
 setMultiValues (array $a_values)
 
 getMultiValues ()
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback (string $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...
 
 setRequestParam (string $key, $val)
 This writes the request (aka post) values. 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 (string $a_type)
 
 checkParentFormTable ()
 
 getSessionKey ()
 
 getMultiIconsHTML ()
 
 int ($key)
 
 intArray ($key)
 
 str ($key)
 
 raw ($key)
 
 strArray ($key)
 
 arrayArray ($key)
 
 isRequestParamArray (string $key)
 
 getRequestParam (string $key, Refinery\Transformation $t)
 

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 = null
 
int $maxlength = 200
 
int $size = 40
 
string $validationRegexp = ""
 
string $validationFailureMessage = ''
 
string $suffix = ""
 
string $style_css = ""
 
string $css_class = ""
 
string $ajax_datasource = ""
 
string $ajax_datasource_delimiter = null
 
bool $ajax_datasource_commit = false
 
string $ajax_datasource_commit_url = ""
 
bool $submit_form_on_enter = false
 
bool $autocomplete_disabled = false
 
string $input_type = ""
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
array $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
array $set_params = []
 
ilTable2GUI $parent_table = null
 
ilFormPropertyGUI $parent_gui = null
 
ilCtrl $ctrl
 
ilLanguage $lng
 
string $type = ""
 
string $title = ""
 
string $postvar = ""
 
string $info = ""
 
string $alert = ""
 
bool $required = false
 
ilPropertyFormGUI $parentform = null
 
string $hidden_title = ""
 
bool $multi = false
 
bool $multi_sortable = false
 
bool $multi_addremove = true
 
array $multi_values = []
 
RequestInterface $request
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
bool $disabled = false
 
ilGlobalTemplateInterface $global_tpl = null
 

Private Member Functions

 getCorrectnessIcon ($correctness)
 

Private Attributes

UIServices $ui
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters (string $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 82 of file class.ilAssNestedOrderingElementsInputGUI.php.

83 {
84 global $DIC;
85 $this->ui = $DIC->ui();
86 $manipulator = new ilAssOrderingDefaultElementFallback();
87 $this->addFormValuesManipulator($manipulator);
88
89 parent::__construct('', $postVar);
90
91 $this->addFormValuesManipulator($converter);
92
93 $this->setHtmlListTag(parent::HTML_LIST_TAG_UL);
94 $this->setCssListClass($this->getCssListClass() . ' ' . self::ILC_CSS_CLASS_LIST);
95 $this->setCssItemClass($this->getCssItemClass() . ' ' . self::ILC_CSS_CLASS_ITEM);
96 $this->setCssHandleClass($this->getCssHandleClass());
97 }
addFormValuesManipulator(ilFormValuesManipulator $manipulator)
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getContext()

ilAssNestedOrderingElementsInputGUI::getContext ( )
Returns
string

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

256 : bool
257 {
258 return $this->getCorrectnessTrueElementList()->elementExistByRandomIdentifier($identifier);
259 }

References getCorrectnessTrueElementList().

Referenced by getItemHtml().

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

◆ getCorrectnessIcon()

ilAssNestedOrderingElementsInputGUI::getCorrectnessIcon (   $correctness)
private

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

261 : string
262 {
263 $icon_name = 'icon_not_ok.svg';
264 $label = $this->lng->txt("answer_is_wrong");
265 if ($correctness === 'correct') {
266 $icon_name = 'icon_ok.svg';
267 $label = $this->lng->txt("answer_is_right");
268 }
269 $path = ilUtil::getImagePath($icon_name);
270 $icon = $this->ui->factory()->symbol()->icon()->custom(
271 $path,
272 $label
273 );
274 return $this->ui->renderer()->render($icon);
275 }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
$path
Definition: ltiservices.php:32

References $path, ilUtil\getImagePath(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

Referenced by getItemHtml().

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

◆ getCorrectnessTrueElementList()

ilAssNestedOrderingElementsInputGUI::getCorrectnessTrueElementList ( )

◆ getCurrentIndentation()

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

Reimplemented from ilMultipleNestedOrderingElementsInputGUI.

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

357 : int
358 {
359 if (!isset($elementValues[$elementCounter])) {
360 return 0;
361 }
362
363 return $elementValues[$elementCounter]['ordering_indentation'];
364 }

◆ getElementImagePath()

ilAssNestedOrderingElementsInputGUI::getElementImagePath ( )
Returns
string

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

112 {
113 require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElementList.php';
115 }
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 131 of file class.ilAssNestedOrderingElementsInputGUI.php.

131 : string
132 {
133 if (!$this->getContext() || !$this->getUniquePrefix()) {
134 return parent::getInstanceId();
135 }
136
137 return $this->getContext() . '_' . $this->getUniquePrefix();
138 }

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
int$position
string$itemSubFieldPostVar
string$itemSubFieldId
Returns
string

Reimplemented from ilMultipleNestedOrderingElementsInputGUI.

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

309 : string
310 {
311 $tpl = $this->getItemTemplate();
312
313 switch ($this->getOrderingType()) {
316
317 $tpl->setCurrentBlock('item_text');
318 $tpl->setVariable("ITEM_CONTENT", ilLegacyFormElementsUtil::prepareFormOutput($element['content']));
319 $tpl->parseCurrentBlock();
320 break;
321
324
325 $tpl->setCurrentBlock('item_image');
326 $tpl->setVariable("ITEM_SOURCE", $this->getThumbnailSource($element));
327 $tpl->setVariable("ITEM_CONTENT", $this->getThumbnailFilename($element));
328 $tpl->parseCurrentBlock();
329 break;
330 }
331
332 if ($this->isShowCorrectnessIconsEnabled()) {
333 $correctness = 'not_correct';
334 if ($this->getCorrectness($identifier)) {
335 $correctness = 'correct';
336 }
337 $tpl->setCurrentBlock('correctness_icon');
338
339 $tpl->setVariable("ICON_OK", $this->getCorrectnessIcon($correctness));
340 $tpl->parseCurrentBlock();
341 }
342
343 $tpl->setCurrentBlock('item');
344 $tpl->setVariable("ITEM_ID", $itemSubFieldId);
345 $tpl->setVariable("ITEM_POSTVAR", $itemSubFieldPostVar);
346 $tpl->setVariable("ITEM_CONTENT", ilLegacyFormElementsUtil::prepareFormOutput($element['content']));
347 $tpl->parseCurrentBlock();
348
349 return $tpl->get();
350 }
static prepareFormOutput($a_str, bool $a_strip=false)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41

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

+ Here is the call graph for this function:

◆ getItemTemplate()

ilAssNestedOrderingElementsInputGUI::getItemTemplate ( )
protected
Returns
ilTemplate

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

280 : ilTemplate
281 {
282 return new ilTemplate('tpl.prop_ass_nested_order_elem.html', true, true, 'Modules/TestQuestionPool');
283 }
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 371 of file class.ilAssNestedOrderingElementsInputGUI.php.

371 : int
372 {
373 if (!isset($elementValues[$elementCounter + 1])) {
374 return 0;
375 }
376
377 return $elementValues[$elementCounter + 1]['ordering_indentation'];
378 }

◆ getOrderingType()

ilAssNestedOrderingElementsInputGUI::getOrderingType ( )
Returns
mixed

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

References $orderingType.

Referenced by getItemHtml().

+ Here is the caller graph for this function:

◆ getThumbnailFilename()

ilAssNestedOrderingElementsInputGUI::getThumbnailFilename (   $element)
protected
Returns
string

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

288 : string
289 {
290 return $this->getThumbPrefix() . $element['content'];
291 }

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
Returns
string

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

296 : string
297 {
298 return $this->getElementImagePath() . $this->getThumbnailFilename($element);
299 }

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 215 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 159 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 380 of file class.ilAssNestedOrderingElementsInputGUI.php.

380 : bool
381 {
382 if (!is_array($data)) {
383 return false;
384 }
385
386 if (!isset($data[$this->getPostVar()])) {
387 return false;
388 }
389
390 if (!count($data[$this->getPostVar()])) {
391 return false;
392 }
393
394 return true;
395 }

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 231 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 120 of file class.ilAssNestedOrderingElementsInputGUI.php.

120 : void
121 {
122 $elementList = $this->getElementList($question->getId());
123
124 $elementList->completeContentsFromElementList(
125 $question->getOrderingElementList()
126 );
127
128 $this->setElementList($elementList);
129 }

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

+ Here is the call graph for this function:

◆ setContext()

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

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

151 : void
152 {
153 $this->context = $context;
154 }

References $context.

◆ setCorrectnessTrueElementList()

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

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

247 : void
248 {
249 $this->correctnessTrueElementList = $correctnessTrueElementList;
250 }

References $correctnessTrueElementList.

◆ setElementImagePath()

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

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

191 : void
192 {
193 $this->elementImagePath = $elementImagePath;
194 }

References $elementImagePath.

◆ setElementList()

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

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

175 : void
176 {
177 $this->orderingType = $orderingType;
178 }

References $orderingType.

◆ setShowCorrectnessIconsEnabled()

ilAssNestedOrderingElementsInputGUI::setShowCorrectnessIconsEnabled (   $showCorrectnessIconsEnabled)
Parameters
$showCorrectnessIconsEnabled

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

223 : void
224 {
225 $this->showCorrectnessIconsEnabled = $showCorrectnessIconsEnabled;
226 }

References $showCorrectnessIconsEnabled.

◆ setThumbPrefix()

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

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

207 : void
208 {
209 $this->thumbnailFilenamePrefix = $thumbnailFilenamePrefix;
210 }

References $thumbnailFilenamePrefix.

◆ setUniquePrefix()

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

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

167 : void
168 {
169 $this->uniquePrefix = $uniquePrefix;
170 }

References $uniquePrefix.

Field Documentation

◆ $context

ilAssNestedOrderingElementsInputGUI::$context = null
protected

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

Referenced by getThumbPrefix(), and setThumbPrefix().

◆ $ui

UIServices ilAssNestedOrderingElementsInputGUI::$ui
private

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