ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ($a_no_notifications=false)
 
 handleRemovedUpload ()
 

Protected Attributes

 $ctrl
 
 $tabs_gui
 
 $lng
 
 $tpl
 
 $exercise
 
 $submission
 
 $assignment
 

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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, $ilCtrl, $lng, $tpl, ilExSubmission\getAssignment(), and getOverviewContent().

39  {
40  global $DIC;
41 
42  $ilCtrl = $DIC->ctrl();
43  $ilTabs = $DIC->tabs();
44  $lng = $DIC->language();
45  $tpl = $DIC["tpl"];
46 
47  $this->exercise = $a_exercise;
48  $this->submission = $a_submission;
49  $this->assignment = $a_submission->getAssignment();
50 
51  // :TODO:
52  $this->ctrl = $ilCtrl;
53  $this->tabs_gui = $ilTabs;
54  $this->lng = $lng;
55  $this->tpl = $tpl;
56  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
+ 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 (   $a_no_notifications = false)
protected

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

References $users, ilNotification\getNotificationsForObject(), ilNotification\TYPE_EXERCISE_SUBMISSION, and ilExerciseMailNotification\TYPE_SUBMISSION_UPLOAD.

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

92  {
93  $has_submitted = $this->submission->hasSubmitted();
94 
95  $this->exercise->processExerciseStatus(
96  $this->assignment,
97  $this->submission->getUserIds(),
98  $has_submitted,
99  $this->submission->validatePeerReviews()
100  );
101 
102  if ($has_submitted &&
103  !$a_no_notifications) {
104  include_once "./Services/Notification/classes/class.ilNotification.php";
106 
107  include_once "./Modules/Exercise/classes/class.ilExerciseMailNotification.php";
108  $not = new ilExerciseMailNotification();
110  $not->setAssignmentId($this->assignment->getId());
111  $not->setRefId($this->exercise->getRefId());
112  $not->setRecipients($users);
113  $not->send();
114  }
115  }
static getNotificationsForObject($type, $id, $page_id=null, $ignore_threshold=false)
Get all users for given object.
$users
Definition: authpage.php:44
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleRemovedUpload()

ilExSubmissionBaseGUI::handleRemovedUpload ( )
protected

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

References handleNewUpload().

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

118  {
119  // #16532 - always send notifications
120  $this->handleNewUpload();
121  }
handleNewUpload($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 60 of file class.ilExSubmissionBaseGUI.php.

References ilExSubmissionTeamGUI\handleTabs().

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

61  {
62  $this->tabs_gui->clearTargets();
63  $this->tabs_gui->setBackTarget(
64  $this->lng->txt("back"),
65  $this->ctrl->getLinkTarget($this, "returnToParent")
66  );
67 
68  $this->tabs_gui->addTab(
69  "submission",
70  $this->lng->txt("exc_submission"),
71  $this->ctrl->getLinkTarget($this, "")
72  );
73  $this->tabs_gui->activateTab("submission");
74 
75  if ($this->assignment->hasTeam()) {
76  include_once "Modules/Exercise/classes/class.ilExSubmissionTeamGUI.php";
78  }
79  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ returnToParentObject()

Field Documentation

◆ $assignment

ilExSubmissionBaseGUI::$assignment
protected

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

◆ $ctrl

◆ $exercise

ilExSubmissionBaseGUI::$exercise
protected

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

◆ $lng

◆ $submission

ilExSubmissionBaseGUI::$submission
protected

◆ $tabs_gui

ilExSubmissionBaseGUI::$tabs_gui
protected

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

◆ $tpl


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