ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilExerciseUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
15 protected $request;
16
20 protected $ui;
21
25 protected $submission_gui;
26
30 protected $exc;
31
35 public function __construct(
38 ) {
39 global $DIC;
40
41 $this->ui = $DIC->ui();
42
43 $this->toolbar = $DIC->toolbar();
44 $this->lng = $DIC->language();
45 $this->ctrl = $DIC->ctrl();
46
47 $this->service = $service;
48 $this->request = $request;
49 }
50
54 public function getExerciseGUI(int $ref_id = null)
55 {
56 if ($ref_id === null) {
57 $ref_id = $this->request->getRequestedRefId();
58 }
59 return new ilObjExerciseGUI([], $ref_id, true, false);
60 }
61
66 {
67 if ($exc === null) {
68 $exc = $this->request->getRequestedExercise();
69 }
70 return new ilExcRandomAssignmentGUI(
71 $this->ui,
72 $this->toolbar,
73 $this->lng,
74 $this->ctrl,
75 $this->service->getRandomAssignmentManager($exc)
76 );
77 }
78
82 public function getSubmissionGUI(
83 ilObjExercise $exc = null,
84 ilExAssignment $ass = null,
85 $member_id = null
86 ) {
87 if ($exc === null) {
88 $exc = $this->request->getRequestedExercise();
89 }
90 if ($ass === null) {
91 $ass = $this->request->getRequestedAssignment();
92 }
93 if ($member_id === null) {
94 $member_id = $this->request->getRequestedMemberId();
95 }
96 return new ilExSubmissionGUI(
97 $exc,
98 $ass,
99 $member_id
100 );
101 }
102}
An exception for terminatinating execution or to throw for unit testing.
Exercise assignment.
Class ilExSubmissionGUI.
Exercise UI frontend presentation service class.
__construct(ilExerciseInternalService $service, ilExerciseUIRequest $request)
Constructor.
getSubmissionGUI(ilObjExercise $exc=null, ilExAssignment $ass=null, $member_id=null)
getExerciseGUI(int $ref_id=null)
getRandomAssignmentGUI(ilObjExercise $exc=null)
Class ilObjExerciseGUI.
Class ilObjExercise.
$service
Definition: result.php:17
ui()
Definition: ui.php:5
$DIC
Definition: xapitoken.php:46