ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilExAssTypeUploadGUI 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 ilExAssTypeUploadGUI:
+ Collaboration diagram for ilExAssTypeUploadGUI:

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...
 
 buildSubmissionPropertiesAndActions (\ILIAS\Exercise\Assignment\PropertyAndActionBuilderUI $builder)
 
- Public Member Functions inherited from ilExAssignmentTypeGUIInterface
 setSubmission (ilExSubmission $a_submission)
 Set submission. More...
 
 setExercise (ilObjExercise $a_exercise)
 Set exercise. More...
 

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 Upload type gui implementations

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

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

Member Function Documentation

◆ addEditFormCustomProperties()

ilExAssTypeUploadGUI::addEditFormCustomProperties ( ilPropertyFormGUI  $form)

Add custom form properties to edit form.

Implements ilExAssignmentTypeGUIInterface.

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

31  : void
32  {
33  }

◆ buildSubmissionPropertiesAndActions()

ilExAssTypeUploadGUI::buildSubmissionPropertiesAndActions ( \ILIAS\Exercise\Assignment\PropertyAndActionBuilderUI  $builder)

Implements ilExAssignmentTypeGUIInterface.

Definition at line 57 of file class.ilExAssTypeUploadGUI.php.

References $DIC, Vendor\Package\$f, $lng, $url, and getSubmission().

57  : void
58  {
59  global $DIC;
60 
61  $lng = $DIC->language();
62  $ctrl = $DIC->ctrl();
63  $submission = $this->getSubmission();
64  $f = $DIC->ui()->factory();
65 
66  $titles = array();
67  foreach ($submission->getFiles() as $file) {
68  $titles[] = htmlentities($file["filetitle"]);
69  }
70  $files_str = implode("<br>", $titles);
71  if ($files_str == "") {
72  $files_str = $lng->txt("message_no_delivered_files");
73  }
74 
75  // no team == no submission
76  if (!$submission->hasNoTeamYet()) {
77  if ($submission->canSubmit()) {
78  $title = (count($titles) == 0
79  ? $lng->txt("exc_hand_in")
80  : $lng->txt("exc_edit_submission"));
81  $url = $ctrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, "ilExSubmissionGUI", "ilExSubmissionFileGUI"), "submissionScreen");
82  $main_button = $f->button()->primary(
83  $title,
84  $url
85  );
86  $builder->setMainAction($builder::SEC_SUBMISSION, $main_button);
87  $builder->addView(
88  "submission",
89  $lng->txt("exc_submission"),
90  $url
91  );
92  } else {
93  if (count($titles) > 0) {
94  $url = $ctrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, "ilExSubmissionGUI", "ilExSubmissionFileGUI"), "submissionScreen");
95  $link = $f->link()->standard(
96  $lng->txt("already_delivered_files"),
97  $url
98  );
99  $builder->addAction($builder::SEC_SUBMISSION, $link);
100  $builder->addView(
101  "submission",
102  $lng->txt("exc_submission"),
103  $url
104  );
105  }
106  }
107  }
108 
109  $builder->addProperty(
110  $builder::SEC_SUBMISSION,
111  $lng->txt("exc_files_returned"),
112  $files_str
113  );
114  }
getSubmission()
Get submission.
global $DIC
Definition: feed.php:28
$lng
$url
Definition: ltiregstart.php:35
+ Here is the call graph for this function:

◆ getFormValuesArray()

ilExAssTypeUploadGUI::getFormValuesArray ( ilExAssignment  $ass)

Get form values array from assignment.

Returns
array

Implements ilExAssignmentTypeGUIInterface.

Definition at line 45 of file class.ilExAssTypeUploadGUI.php.

45  : array
46  {
47  return [];
48  }

◆ getOverviewContent()

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

Add overview content of submission to info screen object.

Implements ilExAssignmentTypeGUIInterface.

Definition at line 53 of file class.ilExAssTypeUploadGUI.php.

53  : void
54  {
55  }

◆ importFormToAssignment()

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

Get values from form and put them into assignment.

Implements ilExAssignmentTypeGUIInterface.

Definition at line 38 of file class.ilExAssTypeUploadGUI.php.

38  : void
39  {
40  }

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