ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 13 of file class.ilExAssTypeTextGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilExAssTypeTextGUI::__construct ( )

Constructor.

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

26 {
27 global $DIC;
28
29 $this->lng = $DIC->language();
30 }
global $DIC
Definition: saml.php:7

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

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

References $_POST, $form, and $lng.

◆ getFormValuesArray()

ilExAssTypeTextGUI::getFormValuesArray ( ilExAssignment  $ass)

Get form values array from assignment.

Parameters
ilExAssignment$ass
Returns
array

Implements ilExAssignmentTypeGUIInterface.

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

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

References $values, 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 94 of file class.ilExAssTypeTextGUI.php.

95 {
96 }

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

62 {
63 $a_ass->setMaxCharLimit(0);
64 $a_ass->setMinCharLimit(0);
65 if ($a_form->getInput("limit_characters") && $a_form->getInput("max_char_limit")) {
66 $a_ass->setMaxCharLimit($a_form->getInput("max_char_limit"));
67 }
68 if ($a_form->getInput("limit_characters") && $a_form->getInput("min_char_limit")) {
69 $a_ass->setMinCharLimit($a_form->getInput("min_char_limit"));
70 }
71 }
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 20 of file class.ilExAssTypeTextGUI.php.

Referenced by addEditFormCustomProperties().


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