ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Exercise\InternalGUIService Class Reference

Exercise UI frontend presentation service class. More...

+ Collaboration diagram for ILIAS\Exercise\InternalGUIService:

Public Member Functions

 __construct (Container $DIC, InternalDataService $data_service, InternalDomainService $domain_service)
 
 request (?array $query_params=null, ?array $post_data=null)
 Get request wrapper. More...
 
 getExerciseGUI (?int $ref_id=null)
 
 getRandomAssignmentGUI (\ilObjExercise $exc=null)
 
 getSubmissionGUI (\ilObjExercise $exc=null, \ilExAssignment $ass=null, $member_id=null)
 

Protected Attributes

InternalDataService $data_service
 
InternalDomainService $domain_service
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilToolbarGUI $toolbar
 
HTTP Services $http
 
Refinery Factory $refinery
 
InternalService $service
 
GUIRequest $request = null
 
ilExSubmissionGUI $submission_gui
 
ilObjExercise $exc
 

Detailed Description

Exercise UI frontend presentation service class.

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

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

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Exercise\InternalGUIService::__construct ( Container  $DIC,
InternalDataService  $data_service,
InternalDomainService  $domain_service 
)

Definition at line 49 of file class.InternalGUIService.php.

References ILIAS\Exercise\InternalGUIService\$data_service, ILIAS\Exercise\InternalGUIService\$domain_service, and ILIAS\Repository\initGUIServices().

53  {
54  $this->data_service = $data_service;
55  $this->domain_service = $domain_service;
56  $this->initGUIServices($DIC);
57  }
initGUIServices(\ILIAS\DI\Container $DIC)
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ getExerciseGUI()

ILIAS\Exercise\InternalGUIService::getExerciseGUI ( ?int  $ref_id = null)
Exceptions

Definition at line 86 of file class.InternalGUIService.php.

References $ref_id, and ILIAS\Exercise\InternalGUIService\request().

87  {
88  if ($ref_id === null) {
89  $ref_id = $this->request()->getRefId();
90  }
91  return new \ilObjExerciseGUI([], $ref_id, true);
92  }
request(?array $query_params=null, ?array $post_data=null)
Get request wrapper.
$ref_id
Definition: ltiauth.php:67
+ Here is the call graph for this function:

◆ getRandomAssignmentGUI()

ILIAS\Exercise\InternalGUIService::getRandomAssignmentGUI ( \ilObjExercise  $exc = null)

Definition at line 94 of file class.InternalGUIService.php.

References ILIAS\Repository\ctrl(), ILIAS\Exercise\InternalGUIService\request(), ILIAS\Repository\toolbar(), and ILIAS\Repository\ui().

95  {
96  if ($exc === null) {
97  $exc = $this->request()->getExercise();
98  }
99  return new \ilExcRandomAssignmentGUI(
100  $this->ui(),
101  $this->toolbar(),
102  $this->domain_service->lng(),
103  $this->ctrl(),
104  $this->domain_service->assignment()->randomAssignments($exc)
105  );
106  }
request(?array $query_params=null, ?array $post_data=null)
Get request wrapper.
UI for random assignment (ui)
+ Here is the call graph for this function:

◆ getSubmissionGUI()

ILIAS\Exercise\InternalGUIService::getSubmissionGUI ( \ilObjExercise  $exc = null,
\ilExAssignment  $ass = null,
  $member_id = null 
)

Definition at line 108 of file class.InternalGUIService.php.

References ILIAS\Exercise\InternalGUIService\request().

113  if ($exc === null) {
114  $exc = $this->request()->getExercise();
115  }
116  if ($ass === null) {
117  $ass = $this->request()->getAssignment();
118  }
119  if ($member_id === null) {
120  $member_id = $this->request()->getMemberId();
121  }
122  return new \ilExSubmissionGUI(
123  $exc,
124  $ass,
125  $member_id
126  );
127  }
request(?array $query_params=null, ?array $post_data=null)
Get request wrapper.
Class ilExSubmissionGUI.
+ Here is the call graph for this function:

◆ request()

ILIAS\Exercise\InternalGUIService::request ( ?array  $query_params = null,
?array  $post_data = null 
)

Get request wrapper.

If dummy data is provided the usual http wrapper will not be used.

Returns
GUIRequest

Definition at line 64 of file class.InternalGUIService.php.

References ILIAS\Exercise\InternalGUIService\$request, and ILIAS\FileDelivery\http().

Referenced by ILIAS\Exercise\InternalGUIService\getExerciseGUI(), ILIAS\Exercise\InternalGUIService\getRandomAssignmentGUI(), and ILIAS\Exercise\InternalGUIService\getSubmissionGUI().

67  : GUIRequest {
68  if (is_null($query_params) && is_null($post_data) && !is_null($this->request)) {
69  return $this->request;
70  }
71  $request = new GUIRequest(
72  $this->http(),
73  $this->domain_service->refinery(),
74  $query_params,
75  $post_data
76  );
77  if (is_null($query_params) && is_null($post_data)) {
78  $this->request = $request;
79  }
80  return $request;
81  }
request(?array $query_params=null, ?array $post_data=null)
Get request wrapper.
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ILIAS\Exercise\InternalGUIService::$ctrl
protected

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

◆ $data_service

InternalDataService ILIAS\Exercise\InternalGUIService::$data_service
protected

◆ $domain_service

InternalDomainService ILIAS\Exercise\InternalGUIService::$domain_service
protected

◆ $exc

ilObjExercise ILIAS\Exercise\InternalGUIService::$exc
protected

Definition at line 47 of file class.InternalGUIService.php.

◆ $http

HTTP Services ILIAS\Exercise\InternalGUIService::$http
protected

Definition at line 40 of file class.InternalGUIService.php.

◆ $lng

ilLanguage ILIAS\Exercise\InternalGUIService::$lng
protected

Definition at line 37 of file class.InternalGUIService.php.

◆ $refinery

Refinery Factory ILIAS\Exercise\InternalGUIService::$refinery
protected

Definition at line 41 of file class.InternalGUIService.php.

◆ $request

GUIRequest ILIAS\Exercise\InternalGUIService::$request = null
protected

◆ $service

InternalService ILIAS\Exercise\InternalGUIService::$service
protected

Definition at line 43 of file class.InternalGUIService.php.

◆ $submission_gui

ilExSubmissionGUI ILIAS\Exercise\InternalGUIService::$submission_gui
protected

Definition at line 46 of file class.InternalGUIService.php.

◆ $toolbar

ilToolbarGUI ILIAS\Exercise\InternalGUIService::$toolbar
protected

Definition at line 39 of file class.InternalGUIService.php.


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