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

Public Member Functions

 __construct (ilCtrl $ctrl, ilLanguage $lng, ilAssQuestionSkillAssignmentsGUI $parentGUI)
 
 getQuestion ()
 
 setQuestion ($question)
 
 getAssignment ()
 
 setAssignment ($assignment)
 
 isManipulationEnabled ()
 
 setManipulationEnabled ($manipulationEnabled)
 
 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

 $ctrl
 
 $lng
 
 $parentGUI
 
- 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
 

Private Member Functions

 buildLacLegendToggleButton ()
 
 populateFullProperties ()
 
 populateLimitedProperties ()
 
 buildResultSkillPointsInputField ()
 
 questionSupportsSolutionCompare ()
 

Private Attributes

 $question = null
 
 $assignment = null
 
 $manipulationEnabled = false
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionSkillAssignmentPropertyFormGUI::__construct ( ilCtrl  $ctrl,
ilLanguage  $lng,
ilAssQuestionSkillAssignmentsGUI  $parentGUI 
)

Member Function Documentation

◆ build()

ilAssQuestionSkillAssignmentPropertyFormGUI::build ( )

Definition at line 108 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

References ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilAssQuestionSkillAssignmentsGUI\CMD_SAVE_SKILL_QUEST_ASSIGN_PROPERTIES_FORM, ilAssQuestionSkillAssignmentsGUI\CMD_SHOW_SKILL_QUEST_ASSIGNS, isManipulationEnabled(), populateFullProperties(), populateLimitedProperties(), questionSupportsSolutionCompare(), ilFormGUI\setFormAction(), ilPropertyFormGUI\setTitle(), and ilNonEditableValueGUI\setValue().

109  {
110  $this->setFormAction($this->ctrl->getFormAction($this->parentGUI));
111 
112  if ($this->isManipulationEnabled()) {
113  $this->addCommandButton(
115  $this->lng->txt('save')
116  );
117 
118  $this->addCommandButton(
120  $this->lng->txt('cancel')
121  );
122  } else {
123  $this->addCommandButton(
125  $this->lng->txt('back')
126  );
127  }
128 
129  $this->setTitle($this->assignment->getSkillTitle());
130 
131  $questionTitle = new ilNonEditableValueGUI($this->lng->txt('question'));
132  $questionTitle->setValue($this->question->getTitle());
133  $this->addItem($questionTitle);
134 
135  $questionDesc = new ilNonEditableValueGUI($this->lng->txt('description'));
136  $questionDesc->setValue($this->question->getComment());
137  $this->addItem($questionDesc);
138 
139  if ($this->questionSupportsSolutionCompare()) {
140  $this->populateFullProperties();
141  } else {
142  $this->populateLimitedProperties();
143  }
144  }
setFormAction($a_formaction)
Set FormAction.
addItem($a_item)
Add Item (Property, SectionHeader).
setTitle($a_title)
Set Title.
addCommandButton($a_cmd, $a_text, $a_id="")
Add Command button.
This class represents a non editable value in a property form.
+ Here is the call graph for this function:

◆ buildLacLegendToggleButton()

ilAssQuestionSkillAssignmentPropertyFormGUI::buildLacLegendToggleButton ( )
private

Definition at line 146 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

Referenced by populateFullProperties().

147  {
148  if ($this->assignment->hasEvalModeBySolution()) {
149  $langVar = 'ass_lac_hide_legend_btn';
150  } else {
151  $langVar = 'ass_lac_show_legend_btn';
152  }
153 
154  return '<a id="lac_legend_toggle_btn" href="#">' . $this->lng->txt($langVar) . '</a>';
155  }
+ Here is the caller graph for this function:

◆ buildResultSkillPointsInputField()

ilAssQuestionSkillAssignmentPropertyFormGUI::buildResultSkillPointsInputField ( )
private

Definition at line 210 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

References isManipulationEnabled(), and ilFormPropertyGUI\setRequired().

Referenced by populateFullProperties(), and populateLimitedProperties().

211  {
212  $questResultSkillPoints = new ilNumberInputGUI($this->lng->txt('tst_comp_points'), 'q_res_skill_points');
213  $questResultSkillPoints->setRequired(true);
214  $questResultSkillPoints->setSize(4);
215  $questResultSkillPoints->setMinvalueShouldBeGreater(false);
216  $questResultSkillPoints->setMinValue(1);
217  $questResultSkillPoints->allowDecimals(false);
218  $questResultSkillPoints->setValue($this->assignment->getSkillPoints());
219  if (!$this->isManipulationEnabled()) {
220  $questResultSkillPoints->setDisabled(true);
221  }
222 
223  return $questResultSkillPoints;
224  }
This class represents a number property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAssignment()

ilAssQuestionSkillAssignmentPropertyFormGUI::getAssignment ( )

◆ getQuestion()

ilAssQuestionSkillAssignmentPropertyFormGUI::getQuestion ( )

◆ isManipulationEnabled()

ilAssQuestionSkillAssignmentPropertyFormGUI::isManipulationEnabled ( )

◆ populateFullProperties()

ilAssQuestionSkillAssignmentPropertyFormGUI::populateFullProperties ( )
private

Definition at line 157 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

References ilPropertyFormGUI\addItem(), ilSubEnabledFormPropertyGUI\addSubItem(), buildLacLegendToggleButton(), buildResultSkillPointsInputField(), isManipulationEnabled(), ilFormPropertyGUI\setRequired(), and ilRadioOption\setValue().

Referenced by build().

158  {
159  $evaluationMode = new ilRadioGroupInputGUI($this->lng->txt('condition'), 'eval_mode');
160  $evalOptionReachedQuestionPoints = new ilRadioOption(
161  $this->lng->txt('qpl_skill_point_eval_by_quest_result'),
162  'result'
163  );
164  $evaluationMode->addOption($evalOptionReachedQuestionPoints);
165  $evalOptionLogicalAnswerCompare = new ilRadioOption(
166  $this->lng->txt('qpl_skill_point_eval_by_solution_compare'),
167  'solution'
168  );
169  $evaluationMode->addOption($evalOptionLogicalAnswerCompare);
170  $evaluationMode->setRequired(true);
171  $evaluationMode->setValue($this->assignment->getEvalMode());
172  if (!$this->isManipulationEnabled()) {
173  $evaluationMode->setDisabled(true);
174  }
175  $this->addItem($evaluationMode);
176 
177  $questSolutionCompareExpressions = new ilLogicalAnswerComparisonExpressionInputGUI(
178  $this->lng->txt('tst_solution_compare_cfg'),
179  'solution_compare_expressions'
180  );
181  $questSolutionCompareExpressions->setRequired(true);
182  $questSolutionCompareExpressions->setAllowMove($this->isManipulationEnabled());
183  $questSolutionCompareExpressions->setAllowAddRemove($this->isManipulationEnabled());
184  $questSolutionCompareExpressions->setQuestionObject($this->question);
185  $questSolutionCompareExpressions->setValues($this->assignment->getSolutionComparisonExpressionList()->get());
186  $questSolutionCompareExpressions->setMinvalueShouldBeGreater(false);
187  $questSolutionCompareExpressions->setMinValue(1);
188  if (!$this->isManipulationEnabled()) {
189  $questSolutionCompareExpressions->setDisabled(true);
190  } else {
191  // #19192
192  $questSolutionCompareExpressions->setInfo($this->buildLacLegendToggleButton());
193  }
194  $evalOptionLogicalAnswerCompare->addSubItem($questSolutionCompareExpressions);
195 
196  $questResultSkillPoints = $this->buildResultSkillPointsInputField();
197  $evalOptionReachedQuestionPoints->addSubItem($questResultSkillPoints);
198  }
This class represents an option in a radio group.
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
setValue($a_value)
Set Value.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateLimitedProperties()

ilAssQuestionSkillAssignmentPropertyFormGUI::populateLimitedProperties ( )
private

Definition at line 200 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

References ilPropertyFormGUI\addItem(), buildResultSkillPointsInputField(), and ilNonEditableValueGUI\setValue().

Referenced by build().

201  {
202  $evaluationMode = new ilNonEditableValueGUI($this->lng->txt('condition'));
203  $evaluationMode->setValue($this->lng->txt('qpl_skill_point_eval_by_quest_result'));
204  $this->addItem($evaluationMode);
205 
206  $questResultSkillPoints = $this->buildResultSkillPointsInputField();
207  $evaluationMode->addSubItem($questResultSkillPoints);
208  }
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a non editable value in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ questionSupportsSolutionCompare()

ilAssQuestionSkillAssignmentPropertyFormGUI::questionSupportsSolutionCompare ( )
private

Definition at line 226 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

Referenced by build().

227  {
228  return (
229  $this->question instanceof iQuestionCondition
230  );
231  }
Class iQuestionCondition.
+ Here is the caller graph for this function:

◆ setAssignment()

ilAssQuestionSkillAssignmentPropertyFormGUI::setAssignment (   $assignment)

◆ setManipulationEnabled()

ilAssQuestionSkillAssignmentPropertyFormGUI::setManipulationEnabled (   $manipulationEnabled)
Parameters
boolean$manipulationEnabled

Definition at line 103 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

References $manipulationEnabled.

◆ setQuestion()

ilAssQuestionSkillAssignmentPropertyFormGUI::setQuestion (   $question)

Field Documentation

◆ $assignment

ilAssQuestionSkillAssignmentPropertyFormGUI::$assignment = null
private

◆ $ctrl

ilAssQuestionSkillAssignmentPropertyFormGUI::$ctrl
protected

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

Referenced by __construct().

◆ $lng

ilAssQuestionSkillAssignmentPropertyFormGUI::$lng
protected

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

Referenced by __construct().

◆ $manipulationEnabled

ilAssQuestionSkillAssignmentPropertyFormGUI::$manipulationEnabled = false
private

◆ $parentGUI

ilAssQuestionSkillAssignmentPropertyFormGUI::$parentGUI
protected

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

Referenced by __construct().

◆ $question

ilAssQuestionSkillAssignmentPropertyFormGUI::$question = null
private

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