ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.GUIService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
29 {
33 
34 
35  public function __construct(
36  InternalDomainService $domain_service,
37  InternalGUIService $gui_service
38  ) {
39  $this->domain_service = $domain_service;
40  $this->gui_service = $gui_service;
41  $this->irss_wrapper_gui = new CollectionWrapperGUI();
42  }
43 
44  public function itemBuilder(
45  \ilObjExercise $exc,
46  MandatoryAssignmentsManager $mandatory_manager
47  ): ItemBuilderUI {
48  return new ItemBuilderUI(
49  $this->propertyAndActionBuilder($exc, $mandatory_manager),
50  $this->gui_service->ui()->factory(),
51  $this->gui_service->ctrl()
52  );
53  }
54 
55  public function panelBuilder(
56  \ilObjExercise $exc,
57  MandatoryAssignmentsManager $mandatory_manager
58  ): PanelBuilderUI {
59  return new PanelBuilderUI(
60  $this->propertyAndActionBuilder($exc, $mandatory_manager),
61  $this->gui_service->ui()->factory(),
62  $this->gui_service->ui()->renderer(),
63  $this->gui_service->ctrl(),
64  $this->domain_service->lng()
65  );
66  }
67 
68  public function propertyAndActionBuilder(
69  \ilObjExercise $exc,
70  MandatoryAssignmentsManager $mandatory_manager
72  return new PropertyAndActionBuilderUI(
73  $exc,
74  $mandatory_manager,
75  $this->domain_service,
76  $this->gui_service
77  );
78  }
79 
81  {
82  return new \ilAssignmentPresentationGUI(
83  $exc,
84  $this->domain_service,
85  $this->gui_service
86  );
87  }
88 
89  public function types(): \ilExAssignmentTypesGUI
90  {
91  return new \ilExAssignmentTypesGUI(
92  $this->domain_service,
93  $this->gui_service
94  );
95  }
96 
98  {
99  if ($exc === null) {
100  $exc = $this->gui_service->request()->getExercise();
101  }
102  return new \ilExcRandomAssignmentGUI(
103  $this->gui_service->ui(),
104  $this->gui_service->toolbar(),
105  $this->domain_service->lng(),
106  $this->gui_service->ctrl(),
107  $this->domain_service->assignment()->randomAssignments($exc)
108  );
109  }
110 
112  int $ref_id,
113  int $ass_id
115  $irss = $this->domain_service->assignment()->instructionFiles($ass_id);
116  $lng = $this->domain_service->lng();
117  $lng->loadLanguageModule("exc");
118 
119  $write = $this->domain_service->access()->checkAccess('write', '', $ref_id);
120 
121  return $this->irss_wrapper_gui->getResourceCollectionGUI(
122  $irss->getStakeholder(),
123  $irss->getCollectionIdString(),
124  $lng->txt('exc_instruction_files'),
125  $write
126  );
127  }
128 
130  int $ref_id,
131  int $ass_id,
132  int $participant_id
134  $feedback_file_manager = $this->domain_service->assignment()->tutorFeedbackFile($ass_id);
135  $lng = $this->domain_service->lng();
136  $lng->loadLanguageModule("exc");
137 
138  $write = $this->domain_service->access()->checkAccess('edit_submissions_grades', '', $ref_id);
139 
140  return $this->irss_wrapper_gui->getResourceCollectionGUI(
141  $feedback_file_manager->getStakeholder(),
142  $feedback_file_manager->getCollectionIdString($participant_id),
143  $feedback_file_manager->getFeedbackTitle($participant_id),
144  $write
145  );
146  }
147 
148 }
Exercise UI frontend presentation service class.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getTutorFeedbackFileResourceCollectionGUI(int $ref_id, int $ass_id, int $participant_id)
panelBuilder(\ilObjExercise $exc, MandatoryAssignmentsManager $mandatory_manager)
Class ilObjExercise.
$ref_id
Definition: ltiauth.php:65
propertyAndActionBuilder(\ilObjExercise $exc, MandatoryAssignmentsManager $mandatory_manager)
UI for random assignment (ui)
ilAssignmentPresentationGUI: ilExSubmissionGUI
__construct(InternalDomainService $domain_service, InternalGUIService $gui_service)
assignmentPresentationGUI(\ilObjExercise $exc)
getRandomAssignmentGUI(?\ilObjExercise $exc=null)
global $lng
Definition: privfeed.php:31
getInstructionFileResourceCollectionGUI(int $ref_id, int $ass_id)
itemBuilder(\ilObjExercise $exc, MandatoryAssignmentsManager $mandatory_manager)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...