ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLogicalAnswerComparisonExpressionInputGUI Class Reference
+ Inheritance diagram for ilLogicalAnswerComparisonExpressionInputGUI:
+ Collaboration diagram for ilLogicalAnswerComparisonExpressionInputGUI:

Public Member Functions

 setValues ($model_values)
 Set Values. More...
 
 getValues ()
 Get Values. More...
 
 getInput ()
 
- Public Member Functions inherited from ilAnswerWizardInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setValue ($a_value)
 
 setValues ($a_values)
 Set Values. More...
 
 getValues ()
 Get Values. More...
 
 setSingleline ($a_value)
 Set singleline. More...
 
 getSingleline ()
 Get singleline. More...
 
 setQuestionObject ($a_value)
 Set question object. More...
 
 getQuestionObject ()
 Get question object. More...
 
 setAllowMove ($a_allow_move)
 Set allow move. More...
 
 getAllowMove ()
 Get allow move. More...
 
 isAddRemoveAllowed ()
 
 setAllowAddRemove ($allowAddRemove)
 
 setMinvalueShouldBeGreater ($a_bool)
 Set minvalueShouldBeGreater. More...
 
 minvalueShouldBeGreater ()
 Get minvalueShouldBeGreater. More...
 
 setMinValue ($a_minvalue)
 Set Minimum Value. More...
 
 getMinValue ()
 Get Minimum Value. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 insert (ilTemplate $a_tpl)
 
- 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...
 

Protected Member Functions

 getTextInputLabel ($lng)
 
 getPointsInputLabel ($lng)
 
 getTemplate ()
 
- Protected Member Functions inherited from ilAnswerWizardInputGUI
 getTextInputLabel ($lng)
 
 getPointsInputLabel ($lng)
 
 getTemplate ()
 
 prepareFormOutput (float|string $input, bool $strip=false)
 
- Protected Member Functions inherited from ilFormPropertyGUI
 symbol ()
 
 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)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters (string $a_text)
 Remove prohibited characters see #19159. More...
 
- Protected Attributes inherited from ilAnswerWizardInputGUI
 $values = []
 
 $allowMove = false
 
 $allowAddRemove = true
 
 $singleline = true
 
 $qstObject = null
 
 $minvalue = false
 
 $minvalueShouldBeGreater = false
 
ilTestLegacyFormsHelper $forms_helper
 
GlyphFactory $glyph_factory
 
Renderer $renderer
 
- 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
 

Detailed Description

Member Function Documentation

◆ getInput()

ilLogicalAnswerComparisonExpressionInputGUI::getInput ( )
Returns
string|string[]

Reimplemented from ilTextInputGUI.

Definition at line 89 of file class.ilLogicalAnswerComparisonExpressionInputGUI.php.

89 : array
90 {
91 if (!$this->isRequestParamArray($this->getPostVar())) {
92 return [];
93 }
94 return $this->getRequestParam(
95 $this->getPostVar(),
96 $this->refinery->kindlyTo()->dictOf(
97 $this->refinery->kindlyTo()->dictOf(
98 $this->refinery->byTrying([
99 $this->refinery->kindlyTo()->float(),
100 $this->refinery->kindlyTo()->string()
101 ])
102 )
103 )
104 );
105 }
getRequestParam(string $key, Refinery\Transformation $t)

References ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequestParam(), ilFormPropertyGUI\isRequestParamArray(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ getPointsInputLabel()

ilLogicalAnswerComparisonExpressionInputGUI::getPointsInputLabel (   $lng)
protected
Parameters
$lng
Returns
mixed

Reimplemented from ilAnswerWizardInputGUI.

Definition at line 76 of file class.ilLogicalAnswerComparisonExpressionInputGUI.php.

77 {
78 return $lng->txt('tst_comp_points');
79 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

References ilFormPropertyGUI\$lng, and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getTemplate()

ilLogicalAnswerComparisonExpressionInputGUI::getTemplate ( )
protected
Returns
string

Reimplemented from ilAnswerWizardInputGUI.

Definition at line 84 of file class.ilLogicalAnswerComparisonExpressionInputGUI.php.

84 : string
85 {
86 return 'tpl.prop_lac_expression_input.html';
87 }

◆ getTextInputLabel()

ilLogicalAnswerComparisonExpressionInputGUI::getTextInputLabel (   $lng)
protected
Parameters
$lng
Returns
mixed

Reimplemented from ilAnswerWizardInputGUI.

Definition at line 67 of file class.ilLogicalAnswerComparisonExpressionInputGUI.php.

68 {
69 return $lng->txt('tst_sol_comp_expressions');
70 }

References ilFormPropertyGUI\$lng, and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getValues()

ilLogicalAnswerComparisonExpressionInputGUI::getValues ( )

Get Values.

Returns
array Values

Reimplemented from ilAnswerWizardInputGUI.

Definition at line 47 of file class.ilLogicalAnswerComparisonExpressionInputGUI.php.

47 : array
48 {
49 $form_values = parent::getValues();
50
51 $model_values = [];
52 foreach ($form_values as $form_value) {
54 $expression->setExpression($form_value->getAnswertext());
55 $expression->setPoints($form_value->getPoints());
56 $expression->setOrderIndex($form_value->getOrder() + 1);
57 $model_values[] = $expression;
58 }
59
60 return $model_values;
61 }

◆ setValues()

ilLogicalAnswerComparisonExpressionInputGUI::setValues (   $a_values)

Set Values.

Parameters
array$a_valueValue

Reimplemented from ilAnswerWizardInputGUI.

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

27 : void
28 {
29 $form_values = [];
30 foreach ($model_values as $model_value) {
31 $form_values[] = new ASS_AnswerSimple(
32 $model_value->getExpression(),
33 $model_value->getPoints(),
34 $model_value->getOrderIndex() - 1,
35 -1,
36 0
37 );
38 }
39
40 if ($form_values === []) {
41 $form_values[] = new ASS_AnswerSimple('', 0, 1);
42 }
43
44 parent::setValues($form_values);
45 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

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