ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilExSubmissionBaseGUI Class Reference

Exercise submission base gui. More...

+ Inheritance diagram for ilExSubmissionBaseGUI:
+ Collaboration diagram for ilExSubmissionBaseGUI:

Public Member Functions

 __construct (ilObjExercise $a_exercise, ilExSubmission $a_submission)
 
 returnToParentObject ()
 

Static Public Member Functions

static getOverviewContent (ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
 

Protected Member Functions

 handleTabs ()
 
 handleNewUpload (bool $a_no_notifications=false)
 
 handleRemovedUpload ()
 
 triggerAssignmentTool ()
 

Protected Attributes

ILIAS Exercise Notification NotificationManager $notification
 
ILIAS Exercise InternalDomainService $domain
 
ILIAS Exercise InternalGUIService $gui
 
ilObjUser $user
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilLanguage $lng
 
ilGlobalTemplateInterface $tpl
 
ilObjExercise $exercise
 
ilExSubmission $submission
 
ilExAssignment $assignment
 
MandatoryAssignmentsManager $mandatory_manager
 
ContextServices $tool_context
 
ilExAssignmentTypesGUI $type_guis
 
int $requested_ref_id
 
GUIRequest $request
 

Detailed Description

Exercise submission base gui.

This is an abstract base class for all types of submissions

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ilExSubmissionBaseGUI::__construct ( ilObjExercise  $a_exercise,
ilExSubmission  $a_submission 
)
Exceptions
ilExcUnknownAssignmentTypeException

Reimplemented in ilExSubmissionFileGUI, ilExSubmissionObjectGUI, and ilExSubmissionTextGUI.

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

56 {
57 global $DIC;
58
59 $service = $DIC->exercise()->internal();
60 $this->gui = $service->gui();
61 $this->domain = $service->domain();
62
63 $this->user = $this->domain->user();
64 $this->ctrl = $this->gui->ctrl();
65 $this->tabs_gui = $this->gui->tabs();
66 $this->lng = $this->domain->lng();
67 $this->tpl = $this->gui->ui()->mainTemplate();
68
69 $this->exercise = $a_exercise;
70 $this->submission = $a_submission;
71 $this->assignment = $a_submission->getAssignment();
72
73 $this->mandatory_manager = $this->domain
74 ->assignment()
75 ->mandatoryAssignments($this->exercise);
76
77 $this->request = $this->gui->request();
78 $this->requested_ref_id = $this->request->getRefId();
79 $this->notification = $this->domain->notification($this->requested_ref_id);
80
81 $this->type_guis = $this->gui->assignment()->types();
82 $this->tool_context = $DIC->globalScreen()->tool()->context();
83 $this->gui = $DIC->exercise()
84 ->internal()
85 ->gui();
86 }
$service
Definition: ltiresult.php:36
global $DIC
Definition: shib_login.php:26

References $DIC, $service, ILIAS\Repository\ctrl(), ilExSubmission\getAssignment(), ILIAS\Repository\lng(), ILIAS\UI\examples\Symbol\Glyph\Notification\notification(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getOverviewContent()

static ilExSubmissionBaseGUI::getOverviewContent ( ilInfoScreenGUI  $a_info,
ilExSubmission  $a_submission 
)
staticabstract

◆ handleNewUpload()

ilExSubmissionBaseGUI::handleNewUpload ( bool  $a_no_notifications = false)
protected

Definition at line 127 of file class.ilExSubmissionBaseGUI.php.

129 : void {
130 $has_submitted = $this->submission->hasSubmitted();
131
132 $this->exercise->processExerciseStatus(
133 $this->assignment,
134 $this->submission->getUserIds(),
135 $has_submitted,
136 $this->submission->validatePeerReviews()
137 );
138
139 if ($has_submitted &&
140 !$a_no_notifications) {
141 $this->notification->sendUploadNotification($this->assignment->getId());
142 }
143 }

References ILIAS\UI\examples\Symbol\Glyph\Notification\notification().

+ Here is the call graph for this function:

◆ handleRemovedUpload()

ilExSubmissionBaseGUI::handleRemovedUpload ( )
protected

Definition at line 145 of file class.ilExSubmissionBaseGUI.php.

145 : void
146 {
147 // #16532 - always send notifications
148 $this->handleNewUpload();
149 }
handleNewUpload(bool $a_no_notifications=false)

◆ handleTabs()

ilExSubmissionBaseGUI::handleTabs ( )
protected

Definition at line 93 of file class.ilExSubmissionBaseGUI.php.

93 : void
94 {
95 return;
96 $this->tabs_gui->clearTargets();
97 $this->tabs_gui->setBackTarget(
98 $this->lng->txt("back"),
99 $this->ctrl->getLinkTarget($this, "returnToParent")
100 );
101
102 $this->tabs_gui->addTab(
103 "submission",
104 $this->lng->txt("exc_submission"),
105 $this->ctrl->getLinkTarget($this, "")
106 );
107 $this->tabs_gui->activateTab("submission");
108
109 if ($this->assignment->hasTeam()) {
111 }
112 }

References ilExSubmissionTeamGUI\handleTabs(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ returnToParentObject()

ilExSubmissionBaseGUI::returnToParentObject ( )

Definition at line 114 of file class.ilExSubmissionBaseGUI.php.

114 : void
115 {
116 if ($this->request->getFromOverview()) {
117 $this->ctrl->redirectByClass(ilObjExerciseGUI::class, "showOverview");
118 }
119 $this->ctrl->returnToParent($this);
120 }

References ILIAS\Repository\ctrl().

Referenced by ilExSubmissionFileGUI\executeCommand(), and ilExSubmissionObjectGUI\executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ triggerAssignmentTool()

ilExSubmissionBaseGUI::triggerAssignmentTool ( )
protected

Definition at line 151 of file class.ilExSubmissionBaseGUI.php.

151 : void
152 {
153 $ass_ids = [$this->assignment->getId()];
154 $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::SHOW_EXC_ASSIGNMENT_INFO, true);
155 $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::EXC_ASS_IDS, $ass_ids);
156 }

References ilExerciseGSToolProvider\EXC_ASS_IDS, and ilExerciseGSToolProvider\SHOW_EXC_ASSIGNMENT_INFO.

Field Documentation

◆ $assignment

ilExAssignment ilExSubmissionBaseGUI::$assignment
protected

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

◆ $ctrl

◆ $domain

ILIAS Exercise InternalDomainService ilExSubmissionBaseGUI::$domain
protected

Definition at line 34 of file class.ilExSubmissionBaseGUI.php.

◆ $exercise

ilObjExercise ilExSubmissionBaseGUI::$exercise
protected

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

◆ $gui

ILIAS Exercise InternalGUIService ilExSubmissionBaseGUI::$gui
protected

◆ $lng

ilLanguage ilExSubmissionBaseGUI::$lng
protected

◆ $mandatory_manager

MandatoryAssignmentsManager ilExSubmissionBaseGUI::$mandatory_manager
protected

Definition at line 44 of file class.ilExSubmissionBaseGUI.php.

◆ $notification

ILIAS Exercise Notification NotificationManager ilExSubmissionBaseGUI::$notification
protected

Definition at line 33 of file class.ilExSubmissionBaseGUI.php.

◆ $request

GUIRequest ilExSubmissionBaseGUI::$request
protected

Definition at line 48 of file class.ilExSubmissionBaseGUI.php.

◆ $requested_ref_id

int ilExSubmissionBaseGUI::$requested_ref_id
protected

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

◆ $submission

ilExSubmission ilExSubmissionBaseGUI::$submission
protected

Definition at line 42 of file class.ilExSubmissionBaseGUI.php.

◆ $tabs_gui

ilTabsGUI ilExSubmissionBaseGUI::$tabs_gui
protected

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

◆ $tool_context

ContextServices ilExSubmissionBaseGUI::$tool_context
protected

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

◆ $tpl

ilGlobalTemplateInterface ilExSubmissionBaseGUI::$tpl
protected

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

◆ $type_guis

ilExAssignmentTypesGUI ilExSubmissionBaseGUI::$type_guis
protected

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

◆ $user

ilObjUser ilExSubmissionBaseGUI::$user
protected

Definition at line 36 of file class.ilExSubmissionBaseGUI.php.


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