ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilExAssTypePortfolioGUI Class Reference

Portfolio type gui implementations. More...

+ Inheritance diagram for ilExAssTypePortfolioGUI:
+ Collaboration diagram for ilExAssTypePortfolioGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 addEditFormCustomProperties (ilPropertyFormGUI $form)
 Add custom form properties to edit form.
Parameters
ilPropertyFormGUI$form
More...
 
 importFormToAssignment (ilExAssignment $ass, ilPropertyFormGUI $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
 setSubmission (ilExSubmission $a_submission)
 Set submission. More...
 
 setExercise (ilObjExercise $a_exercise)
 Set exercise. More...
 

Protected Attributes

 $lng
 

Detailed Description

Portfolio type gui implementations.

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

Definition at line 13 of file class.ilExAssTypePortfolioGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilExAssTypePortfolioGUI::__construct ( )

Constructor.

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

References $DIC.

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

Member Function Documentation

◆ addEditFormCustomProperties()

ilExAssTypePortfolioGUI::addEditFormCustomProperties ( ilPropertyFormGUI  $form)

Add custom form properties to edit form.

Parameters
ilPropertyFormGUI$form

Implements ilExAssignmentTypeGUIInterface.

Definition at line 35 of file class.ilExAssTypePortfolioGUI.php.

References $lng, ilPropertyFormGUI\addItem(), ilRadioOption\addSubItem(), and ilFormPropertyGUI\setRequired().

36  {
37  $lng = $this->lng;
38 
39  $rd_template = new ilRadioGroupInputGUI($lng->txt("exc_template"), "template");
40  $rd_template->setRequired(true);
41  $radio_no_template = new ilRadioOption($lng->txt("exc_without_template"), 0, $lng->txt("exc_without_template_info", "without_template_info"));
42  $radio_with_template = new ilRadioOption($lng->txt("exc_with_template"), 1, $lng->txt("exc_with_template_info", "with_template_info"));
43 
44  include_once "Services/Form/classes/class.ilRepositorySelector2InputGUI.php";
45  $repo = new ilRepositorySelector2InputGUI($lng->txt("exc_portfolio_template"), "template_id");
46  $repo->setRequired(true);
47  $repo->getExplorerGUI()->setSelectableTypes(array("prtt"));
48  $repo->getExplorerGUI()->setTypeWhiteList(array("root", "prtt", "cat", "crs", "grp"));
49  $radio_with_template->addSubItem($repo);
50 
51  $rd_template->addOption($radio_no_template);
52  $rd_template->addOption($radio_with_template);
53  $form->addItem($rd_template);
54  }
This class represents an option in a radio group.
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
addSubItem($a_item)
Add Subitem.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:

◆ getFormValuesArray()

ilExAssTypePortfolioGUI::getFormValuesArray ( ilExAssignment  $ass)

Get form values array from assignment.

Parameters
ilExAssignment$ass
Returns
array

Implements ilExAssignmentTypeGUIInterface.

Definition at line 70 of file class.ilExAssTypePortfolioGUI.php.

References $values, and ilExAssignment\getPortfolioTemplateId().

71  {
72  $values = [];
73 
74  if ($ass->getPortfolioTemplateId() > 0) {
75  $values["template_id"] = $ass->getPortfolioTemplateId();
76  $values["template"] = 1;
77  }
78 
79  return $values;
80  }
getPortfolioTemplateId()
Get portfolio template id.
$values
+ Here is the call graph for this function:

◆ getOverviewContent()

ilExAssTypePortfolioGUI::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 85 of file class.ilExAssTypePortfolioGUI.php.

86  {
87  }

◆ importFormToAssignment()

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

Get values from form and put them into assignment.

Parameters
ilExAssignment$ass
ilPropertyFormGUI$form

Implements ilExAssignmentTypeGUIInterface.

Definition at line 59 of file class.ilExAssTypePortfolioGUI.php.

References ilPropertyFormGUI\getInput(), and ilExAssignment\setPortfolioTemplateId().

60  {
61  $ass->setPortfolioTemplateId(0);
62  if ($form->getInput("template_id") && $form->getInput("template")) {
63  $ass->setPortfolioTemplateId($form->getInput("template_id"));
64  }
65  }
setPortfolioTemplateId($a_val)
Set portfolio template id.
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilExAssTypePortfolioGUI::$lng
protected

Definition at line 20 of file class.ilExAssTypePortfolioGUI.php.

Referenced by addEditFormCustomProperties().


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