ILIAS  release_8 Revision v8.24
ilExAssTypeTextGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilExAssTypeTextGUI:
+ Collaboration diagram for ilExAssTypeTextGUI:

Public Member Functions

 addEditFormCustomProperties (ilPropertyFormGUI $form)
 Add custom form properties to edit form. More...
 
 importFormToAssignment (ilExAssignment $ass, ilPropertyFormGUI $form)
 Get values from form and put them into assignment. More...
 
 getFormValuesArray (ilExAssignment $ass)
 Get form values array from assignment.
Returns
array
More...
 
 getOverviewContent (ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
 Add overview content of submission to info screen object. More...
 
- Public Member Functions inherited from ilExAssignmentTypeGUIInterface
 addEditFormCustomProperties (ilPropertyFormGUI $form)
 Add custom form properties to edit form. More...
 
 importFormToAssignment (ilExAssignment $ass, ilPropertyFormGUI $form)
 Get values from form and put them into assignment. More...
 
 getFormValuesArray (ilExAssignment $ass)
 Get form values array from assignment. More...
 
 getOverviewContent (ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
 Add overview content of submission to info screen object. More...
 
 setSubmission (ilExSubmission $a_submission)
 Set submission. More...
 
 setExercise (ilObjExercise $a_exercise)
 Set exercise. More...
 

Protected Attributes

 $lng
 
int $requested_min_char_limit = 0
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Text type gui implementations

Author
Alex Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilExAssTypeTextGUI.php.

Member Function Documentation

◆ addEditFormCustomProperties()

ilExAssTypeTextGUI::addEditFormCustomProperties ( ilPropertyFormGUI  $form)

Add custom form properties to edit form.

Implements ilExAssignmentTypeGUIInterface.

Definition at line 50 of file class.ilExAssTypeTextGUI.php.

50 : void
51 {
53
54 $rb_limit_chars = new ilCheckboxInputGUI($lng->txt("exc_limit_characters"), "limit_characters");
55
56 $min_char_limit = new ilNumberInputGUI($lng->txt("exc_min_char_limit"), "min_char_limit");
57 $min_char_limit->allowDecimals(false);
58 $min_char_limit->setMinValue(0);
59 $min_char_limit->setSize(3);
60
61 $max_char_limit = new ilNumberInputGUI($lng->txt("exc_max_char_limit"), "max_char_limit");
62 $max_char_limit->allowDecimals(false);
63 $max_char_limit->setMinValue($this->requested_min_char_limit + 1);
64
65 $max_char_limit->setSize(3);
66
67 $rb_limit_chars->addSubItem($min_char_limit);
68 $rb_limit_chars->addSubItem($max_char_limit);
69
70 $form->addItem($rb_limit_chars);
71 }
This class represents a checkbox property in a property form.
This class represents a number property in a property form.

References $lng, and ilPropertyFormGUI\addItem().

+ Here is the call graph for this function:

◆ getFormValuesArray()

ilExAssTypeTextGUI::getFormValuesArray ( ilExAssignment  $ass)

Get form values array from assignment.

Returns
array

Implements ilExAssignmentTypeGUIInterface.

Definition at line 88 of file class.ilExAssTypeTextGUI.php.

88 : array
89 {
90 $values = [];
91 if ($ass->getMinCharLimit() !== 0) {
92 $values['limit_characters'] = 1;
93 $values['min_char_limit'] = $ass->getMinCharLimit();
94 }
95 if ($ass->getMaxCharLimit() !== 0) {
96 $values['limit_characters'] = 1;
97 $values['max_char_limit'] = $ass->getMaxCharLimit();
98 }
99
100 return $values;
101 }

References ilExAssignment\getMaxCharLimit(), and ilExAssignment\getMinCharLimit().

+ Here is the call graph for this function:

◆ getOverviewContent()

ilExAssTypeTextGUI::getOverviewContent ( ilInfoScreenGUI  $a_info,
ilExSubmission  $a_submission 
)

Add overview content of submission to info screen object.

Implements ilExAssignmentTypeGUIInterface.

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

103 : void
104 {
105 }

◆ importFormToAssignment()

ilExAssTypeTextGUI::importFormToAssignment ( ilExAssignment  $ass,
ilPropertyFormGUI  $form 
)

Get values from form and put them into assignment.

Implements ilExAssignmentTypeGUIInterface.

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

73 : void
74 {
75 $ass->setMaxCharLimit(0);
76 $ass->setMinCharLimit(0);
77 if ($form->getInput("limit_characters") && $form->getInput("max_char_limit")) {
78 $ass->setMaxCharLimit($form->getInput("max_char_limit"));
79 }
80 if ($form->getInput("limit_characters") && $form->getInput("min_char_limit")) {
81 $ass->setMinCharLimit($form->getInput("min_char_limit"));
82 }
83 }
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-...

References ilPropertyFormGUI\getInput(), ilExAssignment\setMaxCharLimit(), and ilExAssignment\setMinCharLimit().

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilExAssTypeTextGUI::$lng
protected

Definition at line 31 of file class.ilExAssTypeTextGUI.php.

Referenced by addEditFormCustomProperties().

◆ $requested_min_char_limit

int ilExAssTypeTextGUI::$requested_min_char_limit = 0
protected

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


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