ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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

 $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 18 of file class.ilExSubmissionBaseGUI.php.

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

19  {
20  global $ilCtrl, $ilTabs, $lng, $tpl;
21 
22  $this->exercise = $a_exercise;
23  $this->submission = $a_submission;
24  $this->assignment = $a_submission->getAssignment();
25 
26  // :TODO:
27  $this->ctrl = $ilCtrl;
28  $this->tabs_gui = $ilTabs;
29  $this->lng = $lng;
30  $this->tpl = $tpl;
31  }
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:17
+ 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 62 of file class.ilExSubmissionBaseGUI.php.

References 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().

63  {
64  $has_submitted = $this->submission->hasSubmitted();
65 
66  $this->exercise->processExerciseStatus(
67  $this->assignment,
68  $this->submission->getUserIds(),
69  $has_submitted,
70  $this->submission->validatePeerReviews());
71 
72  if($has_submitted &&
73  !$a_no_notifications)
74  {
75  include_once "./Services/Notification/classes/class.ilNotification.php";
77 
78  include_once "./Modules/Exercise/classes/class.ilExerciseMailNotification.php";
79  $not = new ilExerciseMailNotification();
81  $not->setAssignmentId($this->assignment->getId());
82  $not->setRefId($this->exercise->getRefId());
83  $not->setRecipients($users);
84  $not->send();
85  }
86  }
static getNotificationsForObject($type, $id, $page_id=null, $ignore_threshold=false)
Get all users for given object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleRemovedUpload()

ilExSubmissionBaseGUI::handleRemovedUpload ( )
protected

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

References handleNewUpload().

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

89  {
90  // #16532 - always send notifications
91  $this->handleNewUpload();
92  }
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 35 of file class.ilExSubmissionBaseGUI.php.

References ilExSubmissionTeamGUI\handleTabs().

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

36  {
37  $this->tabs_gui->clearTargets();
38  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
39  $this->ctrl->getLinkTarget($this, "returnToParent"));
40 
41  $this->tabs_gui->addTab("submission", $this->lng->txt("exc_submission"),
42  $this->ctrl->getLinkTarget($this, ""));
43  $this->tabs_gui->activateTab("submission");
44 
45  if($this->assignment->hasTeam())
46  {
47  include_once "Modules/Exercise/classes/class.ilExSubmissionTeamGUI.php";
49  }
50  }
+ 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 16 of file class.ilExSubmissionBaseGUI.php.

◆ $exercise

ilExSubmissionBaseGUI::$exercise
protected

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

◆ $submission

ilExSubmissionBaseGUI::$submission
protected

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


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