ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 42 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

44 {
45 global $DIC;
46 $this->ui_factory = $DIC['ui.factory'];
47 $this->ui_renderer = $DIC['ui.renderer'];
49 }
__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 81 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

81 : void
82 {
83 $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
84
85 if ($this->isManipulationEnabled()) {
86 $this->addCommandButton(
88 $this->lng->txt('save')
89 );
90
91 $this->addCommandButton(
93 $this->lng->txt('cancel')
94 );
95 } else {
96 $this->addCommandButton(
98 $this->lng->txt('back')
99 );
100 }
101
102 $this->setTitle($this->assignment->getSkillTitle());
103
104 $questionTitle = new ilNonEditableValueGUI($this->lng->txt('question'));
105 $questionTitle->setValue($this->question->getTitle());
106 $this->addItem($questionTitle);
107
108 $questionDesc = new ilNonEditableValueGUI($this->lng->txt('description'));
109 $questionDesc->setValue($this->question->getComment());
110 $this->addItem($questionDesc);
111
112 if ($this->questionSupportsSolutionCompare()) {
113 $this->populateFullProperties();
114 } else {
116 }
117 }
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 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().

+ Here is the call graph for this function:

◆ buildResultSkillPointsInputField()

ilAssQuestionSkillAssignmentPropertyFormGUI::buildResultSkillPointsInputField ( )
private

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

196 {
197 $questResultSkillPoints = new ilNumberInputGUI($this->lng->txt('tst_comp_points'), 'q_res_skill_points');
198 $questResultSkillPoints->setRequired(true);
199 $questResultSkillPoints->setSize(4);
200 $questResultSkillPoints->setMinvalueShouldBeGreater(false);
201 $questResultSkillPoints->setMinValue(1);
202 $questResultSkillPoints->allowDecimals(false);
203 $questResultSkillPoints->setValue((string) $this->assignment->getSkillPoints());
204 if (!$this->isManipulationEnabled()) {
205 $questResultSkillPoints->setDisabled(true);
206 }
207
208 return $questResultSkillPoints;
209 }
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 ( )

◆ getHTML()

ilAssQuestionSkillAssignmentPropertyFormGUI::getHTML ( )

Reimplemented from ilPropertyFormGUI.

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

119 : string
120 {
121 if ($this->legend_modal === null) {
122 return parent::getHTML();
123 }
124 return parent::getHTML() . $this->ui_renderer->render($this->legend_modal);
125 }

◆ getQuestion()

ilAssQuestionSkillAssignmentPropertyFormGUI::getQuestion ( )

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

127 : void
128 {
129 $evaluation_mode = new ilRadioGroupInputGUI($this->lng->txt('condition'), 'eval_mode');
130 $eval_option_reached_pointsoints = new ilRadioOption(
131 $this->lng->txt('qpl_skill_point_eval_by_quest_result'),
132 'result'
133 );
134 $evaluation_mode->addOption($eval_option_reached_pointsoints);
135 $eval_option_logical_answer_compare = new ilRadioOption(
136 $this->lng->txt('qpl_skill_point_eval_by_solution_compare'),
137 'solution'
138 );
139 $evaluation_mode->addOption($eval_option_logical_answer_compare);
140 $evaluation_mode->setRequired(true);
141 $evaluation_mode->setValue($this->assignment->getEvalMode());
142 if (!$this->isManipulationEnabled()) {
143 $evaluation_mode->setDisabled(true);
144 }
145 $this->addItem($evaluation_mode);
146
147 $quest_solution_compare_expressions = new ilLogicalAnswerComparisonExpressionInputGUI(
148 $this->lng->txt('tst_solution_compare_cfg'),
149 'solution_compare_expressions'
150 );
151 $quest_solution_compare_expressions->setRequired(true);
152 $quest_solution_compare_expressions->setAllowMove($this->isManipulationEnabled());
153 $quest_solution_compare_expressions->setAllowAddRemove($this->isManipulationEnabled());
154 $quest_solution_compare_expressions->setQuestionObject($this->question);
155 $quest_solution_compare_expressions->setValues($this->assignment->getSolutionComparisonExpressionList()->get());
156 $quest_solution_compare_expressions->setMinvalueShouldBeGreater(false);
157 $quest_solution_compare_expressions->setMinValue(1);
158
159 if ($this->isManipulationEnabled()) {
160 if ($this->getQuestion() instanceof iQuestionCondition) {
161 // #19192
162 $legend_gui = new ilAssLacLegendGUI($this->global_tpl, $this->lng, $this->ui_factory);
163 $legend_gui->setQuestionOBJ($this->getQuestion());
164 $this->legend_modal = $legend_gui->get();
165
166 $legend_show_button = $this->ui_factory
167 ->button()
168 ->shy($this->lng->txt('ass_lac_show_legend_btn'), '#')
169 ->withOnClick($this->legend_modal->getShowSignal());
170
171 $quest_solution_compare_expressions->setInfo(
172 $this->ui_renderer->render($legend_show_button)
173 );
174 }
175 } else {
176 $quest_solution_compare_expressions->setDisabled(true);
177 }
178 $eval_option_logical_answer_compare->addSubItem($quest_solution_compare_expressions);
179
180 $eval_option_reached_pointsoints->addSubItem(
182 );
183 }
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 185 of file class.ilAssQuestionSkillAssignmentPropertyFormGUI.php.

185 : void
186 {
187 $evaluationMode = new ilNonEditableValueGUI($this->lng->txt('condition'));
188 $evaluationMode->setValue($this->lng->txt('qpl_skill_point_eval_by_quest_result'));
189 $this->addItem($evaluationMode);
190
191 $questResultSkillPoints = $this->buildResultSkillPointsInputField();
192 $evaluationMode->addSubItem($questResultSkillPoints);
193 }

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

211 : bool
212 {
213 return (
214 $this->question instanceof iQuestionCondition
215 );
216 }

Referenced by build().

+ Here is the caller graph for this function:

◆ setAssignment()

ilAssQuestionSkillAssignmentPropertyFormGUI::setAssignment ( ilAssQuestionSkillAssignment  $assignment)

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

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

References $assignment.

◆ setManipulationEnabled()

ilAssQuestionSkillAssignmentPropertyFormGUI::setManipulationEnabled ( bool  $manipulation_enabled)

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

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

References $manipulation_enabled.

◆ setQuestion()

ilAssQuestionSkillAssignmentPropertyFormGUI::setQuestion ( assQuestion  $question)

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

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

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: