ILIAS  release_7 Revision v7.30-3-g800a261c036
ilExAssTypeTextGUI Class Reference

Text type gui implementations. More...

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

Public Member Functions

 __construct ()
 Constructor. More...
 
 addEditFormCustomProperties (ilPropertyFormGUI $form)
 Add custom form properties to edit form.
Parameters
ilPropertyFormGUI$form
More...
 
 importFormToAssignment (ilExAssignment $a_ass, ilPropertyFormGUI $a_form)
 Get values from form and put them into assignment.
Parameters
ilExAssignment$ass
ilPropertyFormGUI$form
More...
 
 getFormValuesArray (ilExAssignment $ass)
 Get form values array from assignment.
Parameters
ilExAssignment$ass
Returns
array
More...
 
 getOverviewContent (ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
 Add overview content of submission to info screen object.
Parameters
ilInfoScreenGUI$a_info
ilExSubmission$a_submission
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
 

Detailed Description

Text type gui implementations.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilExAssTypeTextGUI::__construct ( )

Constructor.

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

23 {
24 global $DIC;
25
26 $this->lng = $DIC->language();
27 }
global $DIC
Definition: goto.php:24

References $DIC.

Member Function Documentation

◆ addEditFormCustomProperties()

ilExAssTypeTextGUI::addEditFormCustomProperties ( ilPropertyFormGUI  $form)

Add custom form properties to edit form.

Parameters
ilPropertyFormGUI$form

Implements ilExAssignmentTypeGUIInterface.

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

33 {
35
36 $rb_limit_chars = new ilCheckboxInputGUI($lng->txt("exc_limit_characters"), "limit_characters");
37
38 $min_char_limit = new ilNumberInputGUI($lng->txt("exc_min_char_limit"), "min_char_limit");
39 $min_char_limit->allowDecimals(false);
40 $min_char_limit->setMinValue(0);
41 $min_char_limit->setSize(3);
42
43 $max_char_limit = new ilNumberInputGUI($lng->txt("exc_max_char_limit"), "max_char_limit");
44 $max_char_limit->allowDecimals(false);
45 $max_char_limit->setMinValue((int) $_POST['min_char_limit'] + 1);
46
47 $max_char_limit->setSize(3);
48
49 $rb_limit_chars->addSubItem($min_char_limit);
50 $rb_limit_chars->addSubItem($max_char_limit);
51
52 $form->addItem($rb_limit_chars);
53 }
$_POST["username"]
This class represents a checkbox property in a property form.
This class represents a number property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).

References $_POST, $lng, and ilPropertyFormGUI\addItem().

+ Here is the call graph for this function:

◆ getFormValuesArray()

ilExAssTypeTextGUI::getFormValuesArray ( ilExAssignment  $ass)

Get form values array from assignment.

Parameters
ilExAssignment$ass
Returns
array

Implements ilExAssignmentTypeGUIInterface.

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

74 {
75 $values = [];
76 if ($ass->getMinCharLimit()) {
77 $values['limit_characters'] = 1;
78 $values['min_char_limit'] = $ass->getMinCharLimit();
79 }
80 if ($ass->getMaxCharLimit()) {
81 $values['limit_characters'] = 1;
82 $values['max_char_limit'] = $ass->getMaxCharLimit();
83 }
84
85 return $values;
86 }
getMinCharLimit()
Get limit minimum characters.
getMaxCharLimit()
get limit maximum characters return int max limit

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.

Parameters
ilInfoScreenGUI$a_info
ilExSubmission$a_submission

Implements ilExAssignmentTypeGUIInterface.

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

92 {
93 }

◆ importFormToAssignment()

ilExAssTypeTextGUI::importFormToAssignment ( ilExAssignment  $a_ass,
ilPropertyFormGUI  $a_form 
)

Get values from form and put them into assignment.

Parameters
ilExAssignment$ass
ilPropertyFormGUI$form

Implements ilExAssignmentTypeGUIInterface.

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

59 {
60 $a_ass->setMaxCharLimit(0);
61 $a_ass->setMinCharLimit(0);
62 if ($a_form->getInput("limit_characters") && $a_form->getInput("max_char_limit")) {
63 $a_ass->setMaxCharLimit($a_form->getInput("max_char_limit"));
64 }
65 if ($a_form->getInput("limit_characters") && $a_form->getInput("min_char_limit")) {
66 $a_ass->setMinCharLimit($a_form->getInput("min_char_limit"));
67 }
68 }
setMaxCharLimit($a_val)
Set limit maximum characters.
setMinCharLimit($a_val)
Set limit minimum characters.
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.

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 17 of file class.ilExAssTypeTextGUI.php.

Referenced by addEditFormCustomProperties().


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