ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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

 __construct (protected \ILIAS\Exercise\InternalDomainService $domain, protected \ILIAS\Exercise\InternalGUIService $gui)
 
 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...
 

Protected Attributes

ILIAS DI UIServices $ui
 
ilCtrl $ctrl
 
ilLanguage $lng
 

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.

Constructor & Destructor Documentation

◆ __construct()

ilExAssTypeUploadGUI::__construct ( protected \ILIAS\Exercise\InternalDomainService  $domain,
protected \ILIAS\Exercise\InternalGUIService  $gui 
)

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

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

35  {
36  $this->lng = $domain->lng();
37  $this->ctrl = $gui->ctrl();
38  $this->ui = $gui->ui();
39  }
+ Here is the call graph for this function:

Member Function Documentation

◆ addEditFormCustomProperties()

ilExAssTypeUploadGUI::addEditFormCustomProperties ( ilPropertyFormGUI  $form)

Add custom form properties to edit form.

Implements ilExAssignmentTypeGUIInterface.

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

45  : void
46  {
47  }

◆ buildSubmissionPropertiesAndActions()

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

Implements ilExAssignmentTypeGUIInterface.

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

References $ctrl, Vendor\Package\$f, $lng, $url, ilCtrl\getLinkTargetByClass(), getSubmission(), ilLanguage\txt(), and ILIAS\Repository\ui().

71  : void
72  {
73  $lng = $this->lng;
75  $submission = $this->getSubmission();
76  $f = $this->ui->factory();
77  $subm = $this->domain->submission($this->ass_id);
78 
79  $titles = array();
80  foreach ($subm->getSubmissionsOfUser($this->user_id) as $s) {
81  $titles[] = htmlentities($s->getTitle());
82  }
83  $files_str = implode("<br>", $titles);
84  if ($files_str == "") {
85  $files_str = $lng->txt("message_no_delivered_files");
86  }
87 
88  // no team == no submission
89  if (!$submission->hasNoTeamYet()) {
90  if ($submission->canSubmit()) {
91  $title = (count($titles) == 0
92  ? $lng->txt("exc_hand_in")
93  : $lng->txt("exc_edit_submission"));
94  $url = $ctrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, "ilExSubmissionGUI", "ilExSubmissionFileGUI"), "submissionScreen");
95  $main_button = $f->button()->primary(
96  $title,
97  $url
98  );
99  $builder->setMainAction($builder::SEC_SUBMISSION, $main_button);
100  $builder->addView(
101  "submission",
102  $lng->txt("exc_submission"),
103  $url
104  );
105  } else {
106  if (count($titles) > 0) {
107  $url = $ctrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, "ilExSubmissionGUI", "ilExSubmissionFileGUI"), "submissionScreen");
108  $link = $f->link()->standard(
109  $lng->txt("already_delivered_files"),
110  $url
111  );
112  $builder->addAction($builder::SEC_SUBMISSION, $link);
113  $builder->addView(
114  "submission",
115  $lng->txt("exc_submission"),
116  $url
117  );
118  }
119  }
120  }
121 
122  $builder->addProperty(
123  $builder::SEC_SUBMISSION,
124  $lng->txt("exc_files_returned"),
125  $files_str
126  );
127  }
getSubmission()
Get submission.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
$url
Definition: shib_logout.php:66
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
+ 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 59 of file class.ilExAssTypeUploadGUI.php.

59  : array
60  {
61  return [];
62  }

◆ getOverviewContent()

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

Add overview content of submission to info screen object.

Implements ilExAssignmentTypeGUIInterface.

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

67  : void
68  {
69  }

◆ importFormToAssignment()

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

Get values from form and put them into assignment.

Implements ilExAssignmentTypeGUIInterface.

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

52  : void
53  {
54  }

Field Documentation

◆ $ctrl

ilCtrl ilExAssTypeUploadGUI::$ctrl
protected

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

Referenced by buildSubmissionPropertiesAndActions().

◆ $lng

ilLanguage ilExAssTypeUploadGUI::$lng
protected

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

Referenced by buildSubmissionPropertiesAndActions().

◆ $ui

ILIAS DI UIServices ilExAssTypeUploadGUI::$ui
protected

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


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