ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAddAnswerModalFormGUI Class Reference
+ Inheritance diagram for ilAddAnswerModalFormGUI:
+ Collaboration diagram for ilAddAnswerModalFormGUI:

Public Member Functions

 __construct ()
 
 setValuesByArray ($a_values, $a_restrict_to_value_keys=false)
 
 getQuestionId ()
 
 setQuestionId (int $questionId)
 
 getQuestionIndex ()
 
 setQuestionIndex (int $questionIndex)
 
 getAnswerValue ()
 
 setAnswerValue (string $answerValue)
 
 build ()
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 setTableWidth ($a_width)
 Set table width. More...
 
 getTableWidth ()
 get table width More...
 
 setMode ($a_mode)
 Set Mode ('std', 'subform'). More...
 
 getMode ()
 Get Mode ('std', 'subform'). More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setTitleIcon ($a_titleicon)
 Set TitleIcon. More...
 
 getTitleIcon ()
 Get TitleIcon. More...
 
 setDescription ($a_val)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setTopAnchor ($a_val)
 Set top anchor. More...
 
 getTopAnchor ()
 Get top anchor. More...
 
 setShowTopButtons ($a_val)
 Get show top buttons. More...
 
 getShowTopButtons ()
 Set show top buttons. More...
 
 addItem ($a_item)
 Add Item (Property, SectionHeader). More...
 
 removeItemByPostVar ($a_post_var, $a_remove_unused_headers=false)
 Remove Item. More...
 
 getItemByPostVar ($a_post_var)
 Get Item by POST variable. More...
 
 setItems ($a_items)
 Set Items. More...
 
 getItems ()
 Get Items. More...
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage ($a_val)
 Set disable standard message. More...
 
 getDisableStandardMessage ()
 Get disable standard message. More...
 
 getHideLabels ()
 Get a value indicating whether the labels should be hidden or not. More...
 
 setHideLabels ($a_value=true)
 Set a value indicating whether the labels should be hidden or not. More...
 
 setValuesByArray ($a_values, $a_restrict_to_value_keys=false)
 Set form values from an array. More...
 
 setValuesByPost ()
 Set form values from POST values. More...
 
 checkInput ()
 Check Post Input. More...
 
 getInput ($a_post_var, $ensureValidation=true)
 Returns the value of a HTTP-POST variable, identified by the passed id. More...
 
 addCustomProperty ( $a_title, $a_html, $a_info="", $a_alert="", $a_required=false)
 Add a custom property. More...
 
 addCommandButton ($a_cmd, $a_text, $a_id="")
 Add Command button. More...
 
 getCommandButtons ()
 Return all Command buttons. More...
 
 clearCommandButtons ()
 Remove all command buttons. More...
 
 getContent ()
 Get Content. More...
 
 insertItem ($item, $a_sub_item=false)
 
 getHTML ()
 
 getFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Was any file uploaded? More...
 
 moveFileUpload ($a_target_directory, $a_field, $a_target_name=null, $a_index=null, $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction ($a_formaction)
 Set FormAction. More...
 
 getFormAction ()
 Get FormAction. More...
 
 setTarget ($a_target)
 Set Target. More...
 
 getTarget ()
 Get Target. More...
 
 setMultipart ($a_multipart)
 Set Enctype Multipart/Formdata true/false. More...
 
 getMultipart ()
 Get Enctype Multipart/Formdata true/false. More...
 
 setId ($a_id)
 Set Id. More...
 
 getId ()
 Get Id. More...
 
 setName ($a_name)
 Set Name. More...
 
 getName ()
 Get Name. More...
 
 setKeepOpen ($a_keepopen)
 Set Keep Form Tag Open. More...
 
 getKeepOpen ()
 Get Keep Form Tag Open. More...
 
 setOpenTag ($a_open)
 Enable/Disable Open Form Tag. More...
 
 getOpenTag ()
 Get Open Form Tag Enabled. More...
 
 setCloseTag ($a_val)
 Set close tag. More...
 
 getCloseTag ()
 Get close tag. More...
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 getHTML ()
 Get HTML. More...
 
 getContent ()
 Get Content. More...
 

Protected Attributes

 $DIC
 
 $questionId = 0
 
 $questionIndex = 0
 
 $answerValue = ''
 
- Protected Attributes inherited from ilPropertyFormGUI
 $lng
 
 $ctrl
 
 $tpl
 
 $user
 
 $settings
 
 $mode = "std"
 
 $check_input_called = false
 
 $disable_standard_message = false
 
 $top_anchor = "il_form_top"
 
 $titleicon = false
 
 $description = ""
 
 $tbl_width = false
 
 $show_top_buttons = true
 
 $hide_labels = false
 
- Protected Attributes inherited from ilFormGUI
 $formaction
 
 $multipart = false
 
 $keepopen = false
 
 $opentag = true
 
 $id
 
 $name
 
 $prevent_double_submission = false
 

Additional Inherited Members

- Protected Member Functions inherited from ilPropertyFormGUI
 hideRequired ($a_type)
 
 rebuildUploadedFiles ()
 try to rebuild files More...
 

Detailed Description

Definition at line 13 of file class.ilAddAnswerModalFormGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilAddAnswerModalFormGUI::__construct ( )

Definition at line 35 of file class.ilAddAnswerModalFormGUI.php.

References $DIC.

36  {
37  global $DIC; /* @var ILIAS\DI\Container $DIC */
38  $this->DIC = $DIC;
39 
40  parent::__construct();
41  }

Member Function Documentation

◆ build()

ilAddAnswerModalFormGUI::build ( )

Definition at line 97 of file class.ilAddAnswerModalFormGUI.php.

References ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), getAnswerValue(), getQuestionId(), getQuestionIndex(), ilFormPropertyGUI\setPostVar(), and ilFormPropertyGUI\setRequired().

98  {
99  $answer = new ilNonEditableValueGUI($this->DIC->language()->txt('answer'));
100  $answer->setPostVar('answer_presentation');
101  $answer->setValue($this->getAnswerValue());
102  $this->addItem($answer);
103 
104  $points = new ilNumberInputGUI($this->DIC->language()->txt('points'), 'points');
105  $points->setRequired(true);
106  $points->setSize(6);
107  $points->allowDecimals(true);
108  $points->setMinvalueShouldBeGreater(true);
109  $points->setMinValue(0);
110  $this->addItem($points);
111 
112  $hiddenAnswerValue = new ilHiddenInputGUI('answer');
113  $hiddenAnswerValue->setValue($this->getAnswerValue());
114  $this->addItem($hiddenAnswerValue);
115 
116  $hiddenQuestionId = new ilHiddenInputGUI('qid');
117  $hiddenQuestionId->setValue($this->getQuestionId());
118  $this->addItem($hiddenQuestionId);
119 
120  $hiddenQuestionIndex = new ilHiddenInputGUI('qindex');
121  $hiddenQuestionIndex->setValue($this->getQuestionIndex());
122  $this->addItem($hiddenQuestionIndex);
123 
124  $this->addCommandButton('addAnswerAsynch', $this->DIC->language()->txt('save'));
125  $this->addCommandButton('cancel', $this->DIC->language()->txt('cancel'));
126  }
setPostVar($a_postvar)
Set Post Variable.
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a hidden form property in a property form.
This class represents a number property in a property form.
addCommandButton($a_cmd, $a_text, $a_id="")
Add Command button.
This class represents a non editable value in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:

◆ getAnswerValue()

ilAddAnswerModalFormGUI::getAnswerValue ( )
Returns
string

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

References $answerValue.

Referenced by build().

84  : string
85  {
86  return $this->answerValue;
87  }
+ Here is the caller graph for this function:

◆ getQuestionId()

ilAddAnswerModalFormGUI::getQuestionId ( )
Returns
int

Definition at line 52 of file class.ilAddAnswerModalFormGUI.php.

References $questionId.

Referenced by build().

52  : int
53  {
54  return $this->questionId;
55  }
+ Here is the caller graph for this function:

◆ getQuestionIndex()

ilAddAnswerModalFormGUI::getQuestionIndex ( )
Returns
int

Definition at line 68 of file class.ilAddAnswerModalFormGUI.php.

References $questionIndex.

Referenced by build().

68  : int
69  {
70  return $this->questionIndex;
71  }
+ Here is the caller graph for this function:

◆ setAnswerValue()

ilAddAnswerModalFormGUI::setAnswerValue ( string  $answerValue)
Parameters
string$answerValue

Definition at line 92 of file class.ilAddAnswerModalFormGUI.php.

References $answerValue.

93  {
94  $this->answerValue = $answerValue;
95  }

◆ setQuestionId()

ilAddAnswerModalFormGUI::setQuestionId ( int  $questionId)
Parameters
int$questionId

Definition at line 60 of file class.ilAddAnswerModalFormGUI.php.

References $questionId.

61  {
62  $this->questionId = $questionId;
63  }

◆ setQuestionIndex()

ilAddAnswerModalFormGUI::setQuestionIndex ( int  $questionIndex)
Parameters
int$questionIndex

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

References $questionIndex.

77  {
78  $this->questionIndex = $questionIndex;
79  }

◆ setValuesByArray()

ilAddAnswerModalFormGUI::setValuesByArray (   $a_values,
  $a_restrict_to_value_keys = false 
)

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

References ilPropertyFormGUI\getItemByPostVar().

44  {
45  $this->getItemByPostVar('answer_presentation')->setValue($a_values['answer']);
46  parent::setValuesByArray($a_values, $a_restrict_to_value_keys);
47  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
+ Here is the call graph for this function:

Field Documentation

◆ $answerValue

ilAddAnswerModalFormGUI::$answerValue = ''
protected

Definition at line 33 of file class.ilAddAnswerModalFormGUI.php.

Referenced by getAnswerValue(), and setAnswerValue().

◆ $DIC

ilAddAnswerModalFormGUI::$DIC
protected

Definition at line 18 of file class.ilAddAnswerModalFormGUI.php.

Referenced by __construct().

◆ $questionId

ilAddAnswerModalFormGUI::$questionId = 0
protected

Definition at line 23 of file class.ilAddAnswerModalFormGUI.php.

Referenced by getQuestionId(), and setQuestionId().

◆ $questionIndex

ilAddAnswerModalFormGUI::$questionIndex = 0
protected

Definition at line 28 of file class.ilAddAnswerModalFormGUI.php.

Referenced by getQuestionIndex(), and setQuestionIndex().


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