ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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 10 of file class.ilExAssTypePortfolioGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilExAssTypePortfolioGUI::__construct ( )

Constructor.

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

References $DIC.

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

Member Function Documentation

◆ addEditFormCustomProperties()

ilExAssTypePortfolioGUI::addEditFormCustomProperties ( ilPropertyFormGUI  $form)

Add custom form properties to edit form.

Parameters
ilPropertyFormGUI$form

Implements ilExAssignmentTypeGUIInterface.

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

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

33  {
34  $lng = $this->lng;
35 
36  $rd_template = new ilRadioGroupInputGUI($lng->txt("exc_template"), "template");
37  $rd_template->setRequired(true);
38  $radio_no_template = new ilRadioOption($lng->txt("exc_without_template"), 0, $lng->txt("exc_without_template_info", "without_template_info"));
39  $radio_with_template = new ilRadioOption($lng->txt("exc_with_template"), 1, $lng->txt("exc_with_template_info", "with_template_info"));
40 
41  $repo = new ilRepositorySelector2InputGUI($lng->txt("exc_portfolio_template"), "template_id");
42  $repo->setRequired(true);
43  $repo->getExplorerGUI()->setSelectableTypes(array("prtt"));
44  $repo->getExplorerGUI()->setTypeWhiteList(array("root", "prtt", "cat", "crs", "grp"));
45  $radio_with_template->addSubItem($repo);
46 
47  $rd_template->addOption($radio_no_template);
48  $rd_template->addOption($radio_with_template);
49  $form->addItem($rd_template);
50  }
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 66 of file class.ilExAssTypePortfolioGUI.php.

References ilExAssignment\getPortfolioTemplateId().

67  {
68  $values = [];
69 
70  if ($ass->getPortfolioTemplateId() > 0) {
71  $values["template_id"] = $ass->getPortfolioTemplateId();
72  $values["template"] = 1;
73  }
74 
75  return $values;
76  }
getPortfolioTemplateId()
Get portfolio template id.
+ 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 81 of file class.ilExAssTypePortfolioGUI.php.

82  {
83  }

◆ 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 55 of file class.ilExAssTypePortfolioGUI.php.

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

56  {
57  $ass->setPortfolioTemplateId(0);
58  if ($form->getInput("template_id") && $form->getInput("template")) {
59  $ass->setPortfolioTemplateId($form->getInput("template_id"));
60  }
61  }
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 17 of file class.ilExAssTypePortfolioGUI.php.

Referenced by addEditFormCustomProperties().


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