ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ()
 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...
 
 setForceTopButtons ($a_val)
 Set force top buttons. More...
 
 getForceTopButtons ()
 Get force 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 ()
 Get HTML. More...
 
 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...
 

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
 hideRequired ($a_type)
 
 rebuildUploadedFiles ()
 try to rebuild files More...
 
- 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
 
 $force_top_buttons = false
 
- Protected Attributes inherited from ilFormGUI
 $formaction
 
 $multipart = false
 
 $keepopen = false
 
 $opentag = true
 
 $id
 
 $name
 
 $prevent_double_submission = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

31 {
32 global $DIC;
33
34 $this->pageTemplate = $pageTemplate;
35 $this->ctrl = $ctrl;
36 $this->lng = $lng;
37 $this->parentGUI = $parentGUI;
38 $this->uiFactory = $DIC->ui()->factory();
39 $this->uiRenderer = $DIC->ui()->renderer();
40
42 }
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ build()

ilAssQuestionSkillAssignmentPropertyFormGUI::build ( )

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

93 {
94 $this->setFormAction($this->ctrl->getFormAction($this->parentGUI));
95
96 if ($this->isManipulationEnabled()) {
97 $this->addCommandButton(
99 $this->lng->txt('save')
100 );
101
102 $this->addCommandButton(
104 $this->lng->txt('cancel')
105 );
106 } else {
107 $this->addCommandButton(
109 $this->lng->txt('back')
110 );
111 }
112
113 $this->setTitle($this->assignment->getSkillTitle());
114
115 $questionTitle = new ilNonEditableValueGUI($this->lng->txt('question'));
116 $questionTitle->setValue($this->question->getTitle());
117 $this->addItem($questionTitle);
118
119 $questionDesc = new ilNonEditableValueGUI($this->lng->txt('description'));
120 $questionDesc->setValue($this->question->getComment());
121 $this->addItem($questionDesc);
122
123 if ($this->questionSupportsSolutionCompare()) {
124 $this->populateFullProperties();
125 } else {
127 }
128 }
setFormAction($a_formaction)
Set FormAction.
This class represents a non editable value in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
addCommandButton($a_cmd, $a_text, $a_id="")
Add Command button.
setTitle($a_title)
Set Title.

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(), and ilPropertyFormGUI\setTitle().

+ Here is the call graph for this function:

◆ buildResultSkillPointsInputField()

ilAssQuestionSkillAssignmentPropertyFormGUI::buildResultSkillPointsInputField ( )
private

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

199 {
200 $questResultSkillPoints = new ilNumberInputGUI($this->lng->txt('tst_comp_points'), 'q_res_skill_points');
201 $questResultSkillPoints->setRequired(true);
202 $questResultSkillPoints->setSize(4);
203 $questResultSkillPoints->setMinvalueShouldBeGreater(false);
204 $questResultSkillPoints->setMinValue(1);
205 $questResultSkillPoints->allowDecimals(false);
206 $questResultSkillPoints->setValue($this->assignment->getSkillPoints());
207 if (!$this->isManipulationEnabled()) {
208 $questResultSkillPoints->setDisabled(true);
209 }
210
211 return $questResultSkillPoints;
212 }
This class represents a number property in a property form.

References isManipulationEnabled().

Referenced by populateFullProperties(), and populateLimitedProperties().

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

◆ getAssignment()

ilAssQuestionSkillAssignmentPropertyFormGUI::getAssignment ( )

◆ getQuestion()

ilAssQuestionSkillAssignmentPropertyFormGUI::getQuestion ( )
Returns
assQuestion

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

References $question.

Referenced by populateFullProperties().

+ Here is the caller graph for this function:

◆ isManipulationEnabled()

ilAssQuestionSkillAssignmentPropertyFormGUI::isManipulationEnabled ( )

◆ populateFullProperties()

ilAssQuestionSkillAssignmentPropertyFormGUI::populateFullProperties ( )
private

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

131 {
132 $evaluationMode = new ilRadioGroupInputGUI($this->lng->txt('condition'), 'eval_mode');
133 $evalOptionReachedQuestionPoints = new ilRadioOption(
134 $this->lng->txt('qpl_skill_point_eval_by_quest_result'),
135 'result'
136 );
137 $evaluationMode->addOption($evalOptionReachedQuestionPoints);
138 $evalOptionLogicalAnswerCompare = new ilRadioOption(
139 $this->lng->txt('qpl_skill_point_eval_by_solution_compare'),
140 'solution'
141 );
142 $evaluationMode->addOption($evalOptionLogicalAnswerCompare);
143 $evaluationMode->setRequired(true);
144 $evaluationMode->setValue($this->assignment->getEvalMode());
145 if (!$this->isManipulationEnabled()) {
146 $evaluationMode->setDisabled(true);
147 }
148 $this->addItem($evaluationMode);
149
150 $questSolutionCompareExpressions = new ilLogicalAnswerComparisonExpressionInputGUI(
151 $this->lng->txt('tst_solution_compare_cfg'),
152 'solution_compare_expressions'
153 );
154 $questSolutionCompareExpressions->setRequired(true);
155 $questSolutionCompareExpressions->setAllowMove($this->isManipulationEnabled());
156 $questSolutionCompareExpressions->setAllowAddRemove($this->isManipulationEnabled());
157 $questSolutionCompareExpressions->setQuestionObject($this->question);
158 $questSolutionCompareExpressions->setValues($this->assignment->getSolutionComparisonExpressionList()->get());
159 $questSolutionCompareExpressions->setMinvalueShouldBeGreater(false);
160
161 $questSolutionCompareExpressions->setMinValue(1);
162 if ($this->isManipulationEnabled()) {
163 if ($this->getQuestion() instanceof iQuestionCondition) {
164 // #19192
165 $legendGUI = new ilAssLacLegendGUI($this->pageTemplate, $this->lng, $this->uiFactory);
166 $legendGUI->setQuestionOBJ($this->getQuestion());
167 $legenModal = $legendGUI->get();
168
169 $legendToggleButton = $this->uiFactory
170 ->button()
171 ->shy($this->lng->txt('ass_lac_show_legend_btn'), '#')
172 ->withOnClick($legenModal->getShowSignal());
173
174 $questSolutionCompareExpressions->setInfo($this->uiRenderer->render([
175 $legendToggleButton,
176 $legenModal
177 ]));
178 }
179 } else {
180 $questSolutionCompareExpressions->setDisabled(true);
181 }
182 $evalOptionLogicalAnswerCompare->addSubItem($questSolutionCompareExpressions);
183
184 $questResultSkillPoints = $this->buildResultSkillPointsInputField();
185 $evalOptionReachedQuestionPoints->addSubItem($questResultSkillPoints);
186 }
This class represents a property in a property form.
This class represents an option in a radio group.
Class iQuestionCondition.

References ilPropertyFormGUI\addItem(), buildResultSkillPointsInputField(), getQuestion(), and isManipulationEnabled().

Referenced by build().

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

◆ populateLimitedProperties()

ilAssQuestionSkillAssignmentPropertyFormGUI::populateLimitedProperties ( )
private

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

189 {
190 $evaluationMode = new ilNonEditableValueGUI($this->lng->txt('condition'));
191 $evaluationMode->setValue($this->lng->txt('qpl_skill_point_eval_by_quest_result'));
192 $this->addItem($evaluationMode);
193
194 $questResultSkillPoints = $this->buildResultSkillPointsInputField();
195 $evaluationMode->addSubItem($questResultSkillPoints);
196 }

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

Referenced by build().

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

◆ questionSupportsSolutionCompare()

ilAssQuestionSkillAssignmentPropertyFormGUI::questionSupportsSolutionCompare ( )
private

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

215 {
216 return (
217 $this->question instanceof iQuestionCondition
218 );
219 }

Referenced by build().

+ Here is the caller graph for this function:

◆ setAssignment()

ilAssQuestionSkillAssignmentPropertyFormGUI::setAssignment (   $assignment)
Parameters
ilAssQuestionSkillAssignment$assignment

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

72 {
73 $this->assignment = $assignment;
74 }

References $assignment.

◆ setManipulationEnabled()

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

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

88 {
89 $this->manipulationEnabled = $manipulationEnabled;
90 }

References $manipulationEnabled.

◆ setQuestion()

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

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

56 {
57 $this->question = $question;
58 }

References $question.

Field Documentation

◆ $assignment

ilAssQuestionSkillAssignmentPropertyFormGUI::$assignment = null
private

◆ $manipulationEnabled

ilAssQuestionSkillAssignmentPropertyFormGUI::$manipulationEnabled = false
private

◆ $pageTemplate

ilAssQuestionSkillAssignmentPropertyFormGUI::$pageTemplate
private

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

Referenced by __construct().

◆ $parentGUI

ilAssQuestionSkillAssignmentPropertyFormGUI::$parentGUI
private

Definition at line 13 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: