ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilAssQuestionSkillAssignmentPropertyFormGUI Class Reference
+ Inheritance diagram for ilAssQuestionSkillAssignmentPropertyFormGUI:
+ Collaboration diagram for ilAssQuestionSkillAssignmentPropertyFormGUI:

Public Member Functions

 __construct (private readonly ilAssQuestionSkillAssignmentsGUI $parent_gui)
 
 getQuestion ()
 
 setQuestion (assQuestion $question)
 
 getAssignment ()
 
 setAssignment (ilAssQuestionSkillAssignment $assignment)
 
 isManipulationEnabled ()
 
 setManipulationEnabled (bool $manipulation_enabled)
 
 build ()
 
 getHTML ()
 
- 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

assQuestion $question = null
 
ilAssQuestionSkillAssignment $assignment = null
 
bool $manipulation_enabled = false
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Modal $legend_modal = null
 

Additional Inherited Members

- Protected Member Functions inherited from ilPropertyFormGUI
 getRequestedPostVar ()
 
 getFileHash ()
 
 hideRequired (string $a_type)
 
 appendOnloadCode (string $html)
 
 rebuildUploadedFiles ()
 
 checkForRequiredField ()
 
- 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 ( private readonly ilAssQuestionSkillAssignmentsGUI  $parent_gui)

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

45 {
46 global $DIC;
47 $this->ui_factory = $DIC['ui.factory'];
48 $this->ui_renderer = $DIC['ui.renderer'];
50 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ build()

ilAssQuestionSkillAssignmentPropertyFormGUI::build ( )

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

82 : void
83 {
84 $assignment = $this->getAssignment();
85 $this->ctrl->setParameter(
86 $this->parent_gui,
87 EditSkillsOfQuestionTableActions::FULL_ROW_ID_PARAMETER,
88 "{$assignment?->getQuestionId()}_{$assignment?->getSkillBaseId()}_{$assignment?->getSkillTrefId()}"
89 );
90 $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
91
92 if ($this->isManipulationEnabled()) {
93 $this->addCommandButton(
95 $this->lng->txt('save')
96 );
97
98 $this->addCommandButton(
100 $this->lng->txt('cancel')
101 );
102 } else {
103 $this->addCommandButton(
105 $this->lng->txt('back')
106 );
107 }
108
109 $this->setTitle($this->assignment->getSkillTitle());
110
111 $questionTitle = new ilNonEditableValueGUI($this->lng->txt('question'));
112 $questionTitle->setValue($this->question->getTitle());
113 $this->addItem($questionTitle);
114
115 $questionDesc = new ilNonEditableValueGUI($this->lng->txt('description'));
116 $questionDesc->setValue($this->question->getComment());
117 $this->addItem($questionDesc);
118
119 if ($this->questionSupportsSolutionCompare()) {
120 $this->populateFullProperties();
121 } else {
123 }
124 }
setFormAction(string $a_formaction)
This class represents a non editable value in a property form.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

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

+ Here is the call graph for this function:

◆ buildResultSkillPointsInputField()

ilAssQuestionSkillAssignmentPropertyFormGUI::buildResultSkillPointsInputField ( )
private

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

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

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

Referenced by populateFullProperties(), and populateLimitedProperties().

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

◆ getAssignment()

ilAssQuestionSkillAssignmentPropertyFormGUI::getAssignment ( )

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

References $assignment.

Referenced by build().

+ Here is the caller graph for this function:

◆ getHTML()

ilAssQuestionSkillAssignmentPropertyFormGUI::getHTML ( )

Reimplemented from ilPropertyFormGUI.

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

126 : string
127 {
128 if ($this->legend_modal === null) {
129 return parent::getHTML();
130 }
131 return parent::getHTML() . $this->ui_renderer->render($this->legend_modal);
132 }

◆ getQuestion()

ilAssQuestionSkillAssignmentPropertyFormGUI::getQuestion ( )

Definition at line 52 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 134 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

134 : void
135 {
136 $evaluation_mode = new ilRadioGroupInputGUI($this->lng->txt('condition'), 'eval_mode');
137 $eval_option_reached_pointsoints = new ilRadioOption(
138 $this->lng->txt('qpl_skill_point_eval_by_quest_result'),
139 'result'
140 );
141 $evaluation_mode->addOption($eval_option_reached_pointsoints);
142 $eval_option_logical_answer_compare = new ilRadioOption(
143 $this->lng->txt('qpl_skill_point_eval_by_solution_compare'),
144 'solution'
145 );
146 $evaluation_mode->addOption($eval_option_logical_answer_compare);
147 $evaluation_mode->setRequired(true);
148 $evaluation_mode->setValue($this->assignment->getEvalMode());
149 if (!$this->isManipulationEnabled()) {
150 $evaluation_mode->setDisabled(true);
151 }
152 $this->addItem($evaluation_mode);
153
154 $quest_solution_compare_expressions = new ilLogicalAnswerComparisonExpressionInputGUI(
155 $this->lng->txt('tst_solution_compare_cfg'),
156 'solution_compare_expressions'
157 );
158 $quest_solution_compare_expressions->setRequired(true);
159 $quest_solution_compare_expressions->setAllowMove($this->isManipulationEnabled());
160 $quest_solution_compare_expressions->setAllowAddRemove($this->isManipulationEnabled());
161 $quest_solution_compare_expressions->setQuestionObject($this->question);
162 $quest_solution_compare_expressions->setValues($this->assignment->getSolutionComparisonExpressionList()->get());
163 $quest_solution_compare_expressions->setMinvalueShouldBeGreater(false);
164 $quest_solution_compare_expressions->setMinValue(1);
165
166 if ($this->isManipulationEnabled()) {
167 if ($this->getQuestion() instanceof iQuestionCondition) {
168 // #19192
169 $legend_gui = new ilAssLacLegendGUI($this->global_tpl, $this->lng, $this->ui_factory);
170 $legend_gui->setQuestionOBJ($this->getQuestion());
171 $this->legend_modal = $legend_gui->get();
172
173 $legend_show_button = $this->ui_factory
174 ->button()
175 ->shy($this->lng->txt('ass_lac_show_legend_btn'), '#')
176 ->withOnClick($this->legend_modal->getShowSignal());
177
178 $quest_solution_compare_expressions->setInfo(
179 $this->ui_renderer->render($legend_show_button)
180 );
181 }
182 } else {
183 $quest_solution_compare_expressions->setDisabled(true);
184 }
185 $eval_option_logical_answer_compare->addSubItem($quest_solution_compare_expressions);
186
187 $eval_option_reached_pointsoints->addSubItem(
189 );
190 }
This class represents a property in a property form.
This class represents an option in a radio group.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

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

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 192 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

192 : void
193 {
194 $evaluationMode = new ilNonEditableValueGUI($this->lng->txt('condition'));
195 $evaluationMode->setValue($this->lng->txt('qpl_skill_point_eval_by_quest_result'));
196 $this->addItem($evaluationMode);
197
198 $questResultSkillPoints = $this->buildResultSkillPointsInputField();
199 $evaluationMode->addSubItem($questResultSkillPoints);
200 }

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

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 219 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

219 : bool
220 {
221 return (
222 $this->question instanceof iQuestionCondition
223 );
224 }

Referenced by build().

+ Here is the caller graph for this function:

◆ setAssignment()

ilAssQuestionSkillAssignmentPropertyFormGUI::setAssignment ( ilAssQuestionSkillAssignment  $assignment)

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

67 : void
68 {
69 $this->assignment = $assignment;
70 }

References $assignment.

◆ setManipulationEnabled()

ilAssQuestionSkillAssignmentPropertyFormGUI::setManipulationEnabled ( bool  $manipulation_enabled)

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

77 : void
78 {
79 $this->manipulation_enabled = $manipulation_enabled;
80 }

References $manipulation_enabled.

◆ setQuestion()

ilAssQuestionSkillAssignmentPropertyFormGUI::setQuestion ( assQuestion  $question)

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

57 : void
58 {
59 $this->question = $question;
60 }

References $question.

Field Documentation

◆ $assignment

ilAssQuestionSkillAssignment ilAssQuestionSkillAssignmentPropertyFormGUI::$assignment = null
private

◆ $legend_modal

Modal ilAssQuestionSkillAssignmentPropertyFormGUI::$legend_modal = null
private

◆ $manipulation_enabled

bool ilAssQuestionSkillAssignmentPropertyFormGUI::$manipulation_enabled = false
private

◆ $question

assQuestion ilAssQuestionSkillAssignmentPropertyFormGUI::$question = null
private

◆ $ui_factory

UIFactory ilAssQuestionSkillAssignmentPropertyFormGUI::$ui_factory
private

◆ $ui_renderer

UIRenderer ilAssQuestionSkillAssignmentPropertyFormGUI::$ui_renderer
private

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