ILIAS  trunk Revision v5.2.0beta1-34115-g3a2438be29
ilAssQuestionSkillAssignmentPropertyFormGUI Class Reference
+ Inheritance diagram for ilAssQuestionSkillAssignmentPropertyFormGUI:
+ Collaboration diagram for ilAssQuestionSkillAssignmentPropertyFormGUI:

Public Member Functions

 __construct (ilGlobalTemplateInterface $pageTemplate, ilCtrl $ctrl, ilLanguage $lng, ilAssQuestionSkillAssignmentsGUI $parentGUI)
 
 getQuestion ()
 
 setQuestion ($question)
 
 getAssignment ()
 
 setAssignment ($assignment)
 
 isManipulationEnabled ()
 
 setManipulationEnabled ($manipulationEnabled)
 
 build ()
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 
 executeCommand ()
 
 setTableWidth (string $a_width)
 
 getTableWidth ()
 
 setMode (string $a_mode)
 
 getMode ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setTitleIcon (string $a_titleicon)
 
 getTitleIcon ()
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setShowTopButtons (bool $a_val)
 
 getShowTopButtons ()
 
 setForceTopButtons (bool $a_val)
 
 getForceTopButtons ()
 
 addItem ($a_item)
 
 removeItemByPostVar (string $a_post_var, bool $a_remove_unused_headers=false)
 
 getItemByPostVar (string $a_post_var)
 
 setItems (array $a_items)
 
 getItems ()
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage (bool $a_val)
 
 getDisableStandardMessage ()
 
 getHideLabels ()
 
 setHideLabels (bool $a_value=true)
 
 setValuesByArray (array $a_values, bool $a_restrict_to_value_keys=false)
 
 setValuesByPost ()
 
 checkInput ()
 
 getInput (string $a_post_var, bool $ensureValidation=true)
 Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-POST variable, identified by the passed postvar. More...
 
 addCommandButton (string $a_cmd, string $a_text, string $a_id="")
 
 getCommandButtons ()
 
 clearCommandButtons ()
 
 getContent ()
 
 insertItem ( $item, bool $a_sub_item=false)
 
 addAsyncOnloadCode (string $code)
 
 getHTML ()
 
 getHTMLAsync ()
 
 getFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 
 moveFileUpload (string $a_target_directory, string $a_field, ?string $a_target_name=null, ?string $a_index=null, ?string $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction (string $a_formaction)
 
 getFormAction ()
 
 setTarget (string $a_target)
 
 getTarget ()
 
 setMultipart (bool $a_multipart)
 
 getMultipart ()
 
 setId (string $a_id)
 
 getId ()
 
 setName (string $a_name)
 
 getName ()
 
 setKeepOpen (bool $a_keepopen)
 
 getKeepOpen ()
 
 setOpenTag (bool $a_open)
 
 getOpenTag ()
 
 setCloseTag (bool $a_val)
 
 getCloseTag ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 getHTML ()
 
 getContent ()
 

Private Member Functions

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

Private Attributes

 $pageTemplate
 
 $parentGUI
 
 $question = null
 
 $assignment = null
 
 $manipulationEnabled = false
 
 $uiFactory
 
 $uiRenderer
 

Additional Inherited Members

- Protected Member Functions inherited from ilPropertyFormGUI
 getRequestedPostVar ()
 
 getFileHash ()
 
 hideRequired (string $a_type)
 
 appendOnloadCode (string $html)
 
 rebuildUploadedFiles ()
 
- Protected Attributes inherited from ilPropertyFormGUI
bool $required_text = false
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTemplate $tpl
 
ilObjUser $user = null
 
ilSetting $settings = null
 
string $mode = "std"
 
bool $check_input_called = false
 
bool $disable_standard_message = false
 
string $top_anchor = "il_form_top"
 
string $title = ''
 
string $titleicon = ""
 
string $description = ""
 
string $tbl_width = ""
 
bool $show_top_buttons = true
 
bool $hide_labels = false
 
bool $force_top_buttons = false
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
ilGlobalTemplateInterface $global_tpl = null
 
 $onload_code = []
 
- Protected Attributes inherited from ilFormGUI
string $formaction = ""
 
bool $multipart = false
 
bool $keepopen = false
 
bool $opentag = true
 
string $id = ''
 
string $name = ''
 
string $target = ''
 
bool $prevent_double_submission = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

References ilPropertyFormGUI\$ctrl, $DIC, ilPropertyFormGUI\$lng, $pageTemplate, $parentGUI, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

49  {
50  global $DIC;
51 
52  $this->pageTemplate = $pageTemplate;
53  $this->ctrl = $ctrl;
54  $this->lng = $lng;
55  $this->parentGUI = $parentGUI;
56  $this->uiFactory = $DIC->ui()->factory();
57  $this->uiRenderer = $DIC->ui()->renderer();
58 
60  }
$DIC
Definition: xapitoken.php:62
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ build()

ilAssQuestionSkillAssignmentPropertyFormGUI::build ( )

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

References ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilAssQuestionSkillAssignmentsGUI\CMD_SAVE_SKILL_QUEST_ASSIGN_PROPERTIES_FORM, ilAssQuestionSkillAssignmentsGUI\CMD_SHOW_SKILL_QUEST_ASSIGNS, ILIAS\Repository\ctrl(), isManipulationEnabled(), ILIAS\Repository\lng(), populateFullProperties(), populateLimitedProperties(), questionSupportsSolutionCompare(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

110  : void
111  {
112  $this->setFormAction($this->ctrl->getFormAction($this->parentGUI));
113 
114  if ($this->isManipulationEnabled()) {
115  $this->addCommandButton(
117  $this->lng->txt('save')
118  );
119 
120  $this->addCommandButton(
122  $this->lng->txt('cancel')
123  );
124  } else {
125  $this->addCommandButton(
127  $this->lng->txt('back')
128  );
129  }
130 
131  $this->setTitle($this->assignment->getSkillTitle());
132 
133  $questionTitle = new ilNonEditableValueGUI($this->lng->txt('question'));
134  $questionTitle->setValue($this->question->getTitle());
135  $this->addItem($questionTitle);
136 
137  $questionDesc = new ilNonEditableValueGUI($this->lng->txt('description'));
138  $questionDesc->setValue($this->question->getComment());
139  $this->addItem($questionDesc);
140 
141  if ($this->questionSupportsSolutionCompare()) {
142  $this->populateFullProperties();
143  } else {
144  $this->populateLimitedProperties();
145  }
146  }
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
+ Here is the call graph for this function:

◆ buildResultSkillPointsInputField()

ilAssQuestionSkillAssignmentPropertyFormGUI::buildResultSkillPointsInputField ( )
private

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

References isManipulationEnabled(), and ILIAS\Repository\lng().

Referenced by populateFullProperties(), and populateLimitedProperties().

217  {
218  $questResultSkillPoints = new ilNumberInputGUI($this->lng->txt('tst_comp_points'), 'q_res_skill_points');
219  $questResultSkillPoints->setRequired(true);
220  $questResultSkillPoints->setSize(4);
221  $questResultSkillPoints->setMinvalueShouldBeGreater(false);
222  $questResultSkillPoints->setMinValue(1);
223  $questResultSkillPoints->allowDecimals(false);
224  $questResultSkillPoints->setValue($this->assignment->getSkillPoints());
225  if (!$this->isManipulationEnabled()) {
226  $questResultSkillPoints->setDisabled(true);
227  }
228 
229  return $questResultSkillPoints;
230  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAssignment()

◆ getQuestion()

ilAssQuestionSkillAssignmentPropertyFormGUI::getQuestion ( )
Returns
assQuestion

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

References $question.

Referenced by populateFullProperties().

65  : ?assQuestion
66  {
67  return $this->question;
68  }
Abstract basic class which is to be extended by the concrete assessment question type classes...
+ Here is the caller graph for this function:

◆ isManipulationEnabled()

ilAssQuestionSkillAssignmentPropertyFormGUI::isManipulationEnabled ( )
Returns
boolean

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

References $manipulationEnabled.

Referenced by build(), buildResultSkillPointsInputField(), and populateFullProperties().

+ Here is the caller graph for this function:

◆ populateFullProperties()

ilAssQuestionSkillAssignmentPropertyFormGUI::populateFullProperties ( )
private

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

References ilPropertyFormGUI\addItem(), ilSubEnabledFormPropertyGUI\addSubItem(), buildResultSkillPointsInputField(), getQuestion(), isManipulationEnabled(), ILIAS\Repository\lng(), ilFormPropertyGUI\setRequired(), and ilRadioOption\setValue().

Referenced by build().

148  : void
149  {
150  $evaluationMode = new ilRadioGroupInputGUI($this->lng->txt('condition'), 'eval_mode');
151  $evalOptionReachedQuestionPoints = new ilRadioOption(
152  $this->lng->txt('qpl_skill_point_eval_by_quest_result'),
153  'result'
154  );
155  $evaluationMode->addOption($evalOptionReachedQuestionPoints);
156  $evalOptionLogicalAnswerCompare = new ilRadioOption(
157  $this->lng->txt('qpl_skill_point_eval_by_solution_compare'),
158  'solution'
159  );
160  $evaluationMode->addOption($evalOptionLogicalAnswerCompare);
161  $evaluationMode->setRequired(true);
162  $evaluationMode->setValue($this->assignment->getEvalMode());
163  if (!$this->isManipulationEnabled()) {
164  $evaluationMode->setDisabled(true);
165  }
166  $this->addItem($evaluationMode);
167 
168  $questSolutionCompareExpressions = new ilLogicalAnswerComparisonExpressionInputGUI(
169  $this->lng->txt('tst_solution_compare_cfg'),
170  'solution_compare_expressions'
171  );
172  $questSolutionCompareExpressions->setRequired(true);
173  $questSolutionCompareExpressions->setAllowMove($this->isManipulationEnabled());
174  $questSolutionCompareExpressions->setAllowAddRemove($this->isManipulationEnabled());
175  $questSolutionCompareExpressions->setQuestionObject($this->question);
176  $questSolutionCompareExpressions->setValues($this->assignment->getSolutionComparisonExpressionList()->get());
177  $questSolutionCompareExpressions->setMinvalueShouldBeGreater(false);
178 
179  $questSolutionCompareExpressions->setMinValue(1);
180  if ($this->isManipulationEnabled()) {
181  if ($this->getQuestion() instanceof iQuestionCondition) {
182  // #19192
183  $legendGUI = new ilAssLacLegendGUI($this->pageTemplate, $this->lng, $this->uiFactory);
184  $legendGUI->setQuestionOBJ($this->getQuestion());
185  $legenModal = $legendGUI->get();
186 
187  $legendToggleButton = $this->uiFactory
188  ->button()
189  ->shy($this->lng->txt('ass_lac_show_legend_btn'), '#')
190  ->withOnClick($legenModal->getShowSignal());
191 
192  $questSolutionCompareExpressions->setInfo($this->uiRenderer->render([
193  $legendToggleButton,
194  $legenModal
195  ]));
196  }
197  } else {
198  $questSolutionCompareExpressions->setDisabled(true);
199  }
200  $evalOptionLogicalAnswerCompare->addSubItem($questSolutionCompareExpressions);
201 
202  $questResultSkillPoints = $this->buildResultSkillPointsInputField();
203  $evalOptionReachedQuestionPoints->addSubItem($questResultSkillPoints);
204  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property in a property form.
setValue(string $a_value)
setRequired(bool $a_required)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateLimitedProperties()

ilAssQuestionSkillAssignmentPropertyFormGUI::populateLimitedProperties ( )
private

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

References ilPropertyFormGUI\addItem(), buildResultSkillPointsInputField(), and ILIAS\Repository\lng().

Referenced by build().

206  : void
207  {
208  $evaluationMode = new ilNonEditableValueGUI($this->lng->txt('condition'));
209  $evaluationMode->setValue($this->lng->txt('qpl_skill_point_eval_by_quest_result'));
210  $this->addItem($evaluationMode);
211 
212  $questResultSkillPoints = $this->buildResultSkillPointsInputField();
213  $evaluationMode->addSubItem($questResultSkillPoints);
214  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ questionSupportsSolutionCompare()

ilAssQuestionSkillAssignmentPropertyFormGUI::questionSupportsSolutionCompare ( )
private

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

Referenced by build().

232  : bool
233  {
234  return (
235  $this->question instanceof iQuestionCondition
236  );
237  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ setAssignment()

ilAssQuestionSkillAssignmentPropertyFormGUI::setAssignment (   $assignment)

◆ setManipulationEnabled()

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

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

References $manipulationEnabled.

105  : void
106  {
107  $this->manipulationEnabled = $manipulationEnabled;
108  }

◆ setQuestion()

ilAssQuestionSkillAssignmentPropertyFormGUI::setQuestion (   $question)
Parameters
assQuestion$question

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

References $question.

Field Documentation

◆ $assignment

ilAssQuestionSkillAssignmentPropertyFormGUI::$assignment = null
private

◆ $manipulationEnabled

ilAssQuestionSkillAssignmentPropertyFormGUI::$manipulationEnabled = false
private

◆ $pageTemplate

ilAssQuestionSkillAssignmentPropertyFormGUI::$pageTemplate
private

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

Referenced by __construct().

◆ $parentGUI

ilAssQuestionSkillAssignmentPropertyFormGUI::$parentGUI
private

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

Referenced by __construct().

◆ $question

ilAssQuestionSkillAssignmentPropertyFormGUI::$question = null
private

◆ $uiFactory

ilAssQuestionSkillAssignmentPropertyFormGUI::$uiFactory
private

◆ $uiRenderer

ilAssQuestionSkillAssignmentPropertyFormGUI::$uiRenderer
private

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