ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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

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

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

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  }
notification()
description: > Example for rendring a notification glyph.
global $DIC
Definition: shib_login.php:26
$service
Definition: ltiservices.php:40
+ Here is the call graph for this function:

Member Function Documentation

◆ getOverviewContent()

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

Referenced by __construct().

+ Here is the caller graph for this function:

◆ handleNewUpload()

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

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

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

Referenced by ilExSubmissionFileGUI\addUploadObject(), handleRemovedUpload(), ilExSubmissionObjectGUI\submitBlog(), ilExSubmissionObjectGUI\submitPortfolio(), and ilExSubmissionTextGUI\updateAssignmentTextObject().

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  }
notification()
description: > Example for rendring a notification glyph.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleRemovedUpload()

ilExSubmissionBaseGUI::handleRemovedUpload ( )
protected

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

References handleNewUpload().

Referenced by ilExSubmissionObjectGUI\createPortfolioObject(), ilExSubmissionFileGUI\deleteDeliveredObject(), ilExSubmissionObjectGUI\saveBlogObject(), ilExSubmissionObjectGUI\setSelectedBlogObject(), ilExSubmissionObjectGUI\setSelectedPortfolioObject(), and ilExSubmissionTextGUI\updateAssignmentTextObject().

145  : void
146  {
147  // #16532 - always send notifications
148  $this->handleNewUpload();
149  }
handleNewUpload(bool $a_no_notifications=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleTabs()

ilExSubmissionBaseGUI::handleTabs ( )
protected

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

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

Referenced by ilExSubmissionObjectGUI\createBlogObject(), ilExSubmissionTextGUI\editAssignmentTextObject(), ilExSubmissionObjectGUI\selectBlogObject(), ilExSubmissionObjectGUI\selectPortfolioObject(), ilExSubmissionTextGUI\showAssignmentTextObject(), and ilExSubmissionFileGUI\submissionScreenObject().

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  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ returnToParentObject()

◆ triggerAssignmentTool()

ilExSubmissionBaseGUI::triggerAssignmentTool ( )
protected

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

References ilExerciseGSToolProvider\EXC_ASS_IDS, and ilExerciseGSToolProvider\SHOW_EXC_ASSIGNMENT_INFO.

Referenced by ilExSubmissionTextGUI\editAssignmentTextObject(), and ilExSubmissionFileGUI\submissionScreenObject().

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  }
+ Here is the caller graph for this function:

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

◆ $lng

◆ $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

◆ $requested_ref_id

int ilExSubmissionBaseGUI::$requested_ref_id
protected

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

◆ $submission

ilExSubmission ilExSubmissionBaseGUI::$submission
protected

◆ $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

◆ $type_guis

ilExAssignmentTypesGUI ilExSubmissionBaseGUI::$type_guis
protected

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

◆ $user

ilObjUser ilExSubmissionBaseGUI::$user
protected

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