ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilExcAssMemberState Class Reference

Handles everything about the state (current phase) of a user in an assignment using assignment, individual deadline, user and team information. More...

+ Collaboration diagram for ilExcAssMemberState:

Public Member Functions

 getIndividualDeadlineObject ()
 Get individual deadline object. More...
 
 getGeneralStart ()
 Get general start. More...
 
 getGeneralStartPresentation ()
 Get start presentation. More...
 
 getIndividualStart ()
 Get individual start. More...
 
 hasGenerallyStarted ()
 Has started. More...
 
 getCalculatedDeadline ()
 Calculated deadline is only given, if a relative deadline is given and the user started the assignment the value may be restricted by the last submission date for relative deadlines. More...
 
 getRelativeDeadline ()
 Get relative deadline. More...
 
 getLastSubmissionOfRelativeDeadline ()
 Get last submission for relative deadline. More...
 
 getRelativeDeadlinePresentation ()
 Get relative deadline presentation. More...
 
 getOfficialDeadline ()
 Get official deadline (individual deadline, fixed deadline or calculated deadline (using relative deadline and starting ts)) More...
 
 getOfficialDeadlinePresentation ()
 Get official deadline presentation. More...
 
 getLastSubmissionOfRelativeDeadlinePresentation ()
 Get last submission for relative deadlines. More...
 
 exceededOfficialDeadline ()
 Check if official deadline exists and has ended. More...
 
 getRemainingTimePresentation ()
 Remaining time presentation (based on official deadline) More...
 
 getIndividualDeadline ()
 Get individual deadline. More...
 
 getIndividualDeadlinePresentation ()
 Get common deadline presentation. More...
 
 getCommonDeadline ()
 Get common deadline (no individual deadline or grace period included) More...
 
 getCommonDeadlinePresentation ()
 Get common deadline presentation. More...
 
 getEffectiveDeadline ()
 Get effective deadline (max of official deadline and grace end period) for the user. More...
 
 getPeerReviewDeadline ()
 Get peer review deadline. More...
 
 getPeerReviewDeadlinePresentation ()
 Get common deadline presentation. More...
 
 isPeerReviewAllowed ()
 Is submission currently allowed. More...
 
 areInstructionsVisible ()
 Instructions visible. More...
 
 inLateSubmissionPhase ()
 Get late submission warning. More...
 
 hasSubmissionStarted ()
 Check if the submission phase has started for the current user. More...
 
 hasSubmissionEnded ()
 Check if the submission phase has ended for the current user. More...
 
 hasSubmissionEndedForAllUsers ()
 Has submission ended for all users. More...
 
 isSubmissionAllowed ()
 Is submission currently allowed. More...
 
 isGlobalFeedbackFileAccessible (ilExSubmission $submission)
 Is global feedback file accessible? More...
 

Static Public Member Functions

static getInstanceByIds ($a_ass_id, $a_user_id=0)
 Get instance by IDs (recommended for consumer code) More...
 
static getInstance (ilExAssignment $a_ass, ilObjUser $a_user, ilExcIndividualDeadline $a_idl, $a_time, ilLanguage $lng, ilExAssignmentTeam $a_team=null)
 Get instance by dependencies. More...
 

Protected Member Functions

 __construct (ilExAssignment $a_ass, ilObjUser $a_user, ilExcIndividualDeadline $a_idl, $a_time, ilLanguage $lng, ilExAssignmentTeam $a_team=null)
 ilExcAssMemberState constructor. More...
 
 getTimePresentation ($a_timestamp)
 Get common deadline presentation. More...
 

Protected Attributes

 $ass_id
 
 $user_id
 
 $assignment
 
 $member_id
 
 $team_id = 0
 
 $is_team = false
 

Detailed Description

Handles everything about the state (current phase) of a user in an assignment using assignment, individual deadline, user and team information.

  • General Start: As entered in settings. For absolute deadlines, this also starts the submission, for relative deadline this allows the user to start the submission period. (0 = immediately)
  • Individual Start: TS when user hits "Start" button for an assignment using a relative deadline
  • Submission Start: For absolute deadlines this is General Start, for relative deadlines Individual Start
  • Deadline: absolute Deadline (e.g. 5.12.2017) as set in settings
  • Relative Deadline: relative Deadline (e.g. 10 Days) as set in settings
  • Last Submission for Relative Deadlines: As set in the settings
  • Calculated Deadline: Min of (Starting Timestamp + Relative Deadline, Last Submission for Relative Deadlines)
  • Individual Deadline: Set by tutor in "Submissions and Grade" screen
  • Common Deadline: Deadline or Calculated Deadline Used for "Ended on" or "Edit Until" presentation
  • Official Deadline: Max of (Deadline and Individual Deadline) or (Calculated Deadline and Individual Deadline)
  • Effective Deadline: Max of official deadline and grace period end date
  • Grace Period End Date: As being set in the settings of assignmet by tutor
  • Grace Period: Period between Official Deadline and Grace Period End Date.
  • Submission Period: From Submission Start (if not given immediately) to Max of (Official Deadline and Grace Period End Date)
  • Late Submission Period: Submissions being handed in during Grace Period
  • Peer Review Start: Max of (Official Deadline OF ALL USERS and Grace Period End Date)
  • Peer Review Deadline: As being set in the settings of assignmet by tutor
  • Peer Review Period: From Peer Feedback Start to Peer Feedback Deadline (may be infinite, if no deadline given)
Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

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

Constructor & Destructor Documentation

◆ __construct()

ilExcAssMemberState::__construct ( ilExAssignment  $a_ass,
ilObjUser  $a_user,
ilExcIndividualDeadline  $a_idl,
  $a_time,
ilLanguage  $lng,
ilExAssignmentTeam  $a_team = null 
)
protected

ilExcAssMemberState constructor.

Parameters
int$a_ass_idassignment id
int$a_user_iduser id

Definition at line 70 of file class.ilExcAssMemberState.php.

References $lng, ilExAssignment\getId(), ilObject\getId(), and ilExAssignment\TYPE_UPLOAD_TEAM.

71  {
72  $this->time = $a_time;
73  $this->ass_id = $a_ass->getId();
74  $this->user_id = $a_user->getId();
75  $this->member_id = $a_user->getId();
76  $this->lng = $lng;
77 
78  $this->assignment = $a_ass;
79 
80  // check team status
81  $this->is_team = false;
82  if ($this->assignment->getType() == ilExAssignment::TYPE_UPLOAD_TEAM) {
83  if ($a_team->getId()) {
84  $this->member_id = $a_team->getId();
85  $this->team_id = $a_team->getId();
86  $this->is_team = true;
87  }
88  }
89 
90  $this->idl = $a_idl;
91  }
getId()
Get assignment id.
getId()
get object id public
$lng
+ Here is the call graph for this function:

Member Function Documentation

◆ areInstructionsVisible()

ilExcAssMemberState::areInstructionsVisible ( )

Instructions visible.

Returns
bool

Definition at line 472 of file class.ilExcAssMemberState.php.

References hasSubmissionStarted().

473  {
474  return $this->hasSubmissionStarted();
475  }
hasSubmissionStarted()
Check if the submission phase has started for the current user.
+ Here is the call graph for this function:

◆ exceededOfficialDeadline()

ilExcAssMemberState::exceededOfficialDeadline ( )

Check if official deadline exists and has ended.

Returns
bool

Definition at line 313 of file class.ilExcAssMemberState.php.

References getOfficialDeadline().

314  {
315  $od = $this->getOfficialDeadline();
316  if ($od && $od < time()) {
317  return true;
318  }
319  return false;
320  }
getOfficialDeadline()
Get official deadline (individual deadline, fixed deadline or calculated deadline (using relative dea...
+ Here is the call graph for this function:

◆ getCalculatedDeadline()

ilExcAssMemberState::getCalculatedDeadline ( )

Calculated deadline is only given, if a relative deadline is given and the user started the assignment the value may be restricted by the last submission date for relative deadlines.

Returns
int

Definition at line 203 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_RELATIVE.

Referenced by getCommonDeadline(), and getOfficialDeadline().

204  {
205  $calculated_deadline = 0;
206  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_RELATIVE) {
207  if ($this->idl->getStartingTimestamp() && $this->assignment->getRelativeDeadline()) {
208  $calculated_deadline = $this->idl->getStartingTimestamp() + ($this->assignment->getRelativeDeadline() * 24 * 60 * 60);
209  }
210  if ($this->assignment->getRelDeadlineLastSubmission() > 0 &&
211  $calculated_deadline > $this->assignment->getRelDeadlineLastSubmission()) {
212  $calculated_deadline = $this->assignment->getRelDeadlineLastSubmission();
213  }
214  }
215  return $calculated_deadline;
216  }
+ Here is the caller graph for this function:

◆ getCommonDeadline()

ilExcAssMemberState::getCommonDeadline ( )

Get common deadline (no individual deadline or grace period included)

Returns
int

Definition at line 377 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_ABSOLUTE, and getCalculatedDeadline().

Referenced by getCommonDeadlinePresentation(), and getIndividualDeadline().

378  {
379  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_ABSOLUTE) { // absolute deadline
380  return $this->assignment->getDeadline();
381  }
382 
383  return $this->getCalculatedDeadline();
384  }
getCalculatedDeadline()
Calculated deadline is only given, if a relative deadline is given and the user started the assignmen...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCommonDeadlinePresentation()

ilExcAssMemberState::getCommonDeadlinePresentation ( )

Get common deadline presentation.

Returns
string

Definition at line 391 of file class.ilExcAssMemberState.php.

References getCommonDeadline(), and getTimePresentation().

392  {
393  if ($this->getCommonDeadline() > 0) {
394  return $this->getTimePresentation($this->getCommonDeadline());
395  }
396 
397  return "no deadline";
398  }
getCommonDeadline()
Get common deadline (no individual deadline or grace period included)
getTimePresentation($a_timestamp)
Get common deadline presentation.
+ Here is the call graph for this function:

◆ getEffectiveDeadline()

ilExcAssMemberState::getEffectiveDeadline ( )

Get effective deadline (max of official deadline and grace end period) for the user.

Returns
int

Definition at line 405 of file class.ilExcAssMemberState.php.

References getOfficialDeadline().

Referenced by hasSubmissionEnded(), and hasSubmissionEndedForAllUsers().

406  {
407  return max($this->getOfficialDeadline(), $this->assignment->getExtendedDeadline());
408  }
getOfficialDeadline()
Get official deadline (individual deadline, fixed deadline or calculated deadline (using relative dea...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGeneralStart()

ilExcAssMemberState::getGeneralStart ( )

Get general start.

Parameters

Definition at line 155 of file class.ilExcAssMemberState.php.

Referenced by getGeneralStartPresentation().

156  {
157  return $this->assignment->getStartTime();
158  }
+ Here is the caller graph for this function:

◆ getGeneralStartPresentation()

ilExcAssMemberState::getGeneralStartPresentation ( )

Get start presentation.

Returns
string

Definition at line 165 of file class.ilExcAssMemberState.php.

References getGeneralStart(), and getTimePresentation().

166  {
167  if ($this->getGeneralStart()) {
168  return $this->getTimePresentation($this->getGeneralStart());
169  }
170  return "";
171  }
getGeneralStart()
Get general start.
getTimePresentation($a_timestamp)
Get common deadline presentation.
+ Here is the call graph for this function:

◆ getIndividualDeadline()

ilExcAssMemberState::getIndividualDeadline ( )

Get individual deadline.

Returns
int

Definition at line 349 of file class.ilExcAssMemberState.php.

References getCommonDeadline().

Referenced by getIndividualDeadlinePresentation().

350  {
351  if ($this->idl->getIndividualDeadline() > $this->getCommonDeadline()) {
352  return $this->idl->getIndividualDeadline();
353  }
354  return 0;
355  }
getCommonDeadline()
Get common deadline (no individual deadline or grace period included)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIndividualDeadlineObject()

ilExcAssMemberState::getIndividualDeadlineObject ( )

Get individual deadline object.

Returns
ilExcIndividualDeadline

Definition at line 143 of file class.ilExcAssMemberState.php.

144  {
145  return $this->idl;
146  }

◆ getIndividualDeadlinePresentation()

ilExcAssMemberState::getIndividualDeadlinePresentation ( )

Get common deadline presentation.

Returns
string

Definition at line 363 of file class.ilExcAssMemberState.php.

References getIndividualDeadline(), and getTimePresentation().

364  {
365  if ($this->getIndividualDeadline() > 0) {
366  return $this->getTimePresentation($this->getIndividualDeadline());
367  }
368 
369  return "";
370  }
getTimePresentation($a_timestamp)
Get common deadline presentation.
getIndividualDeadline()
Get individual deadline.
+ Here is the call graph for this function:

◆ getIndividualStart()

ilExcAssMemberState::getIndividualStart ( )

Get individual start.

Returns
int

Definition at line 178 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_RELATIVE.

Referenced by hasSubmissionStarted().

179  {
180  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_RELATIVE) {
181  return $this->idl->getStartingTimestamp();
182  }
183  return 0;
184  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilExcAssMemberState::getInstance ( ilExAssignment  $a_ass,
ilObjUser  $a_user,
ilExcIndividualDeadline  $a_idl,
  $a_time,
ilLanguage  $lng,
ilExAssignmentTeam  $a_team = null 
)
static

Get instance by dependencies.

Usually you should prefer to use getInstanceByIds. If you use getInstance you need to ensure consistency (e.g. deadline needs to match user)

Definition at line 133 of file class.ilExcAssMemberState.php.

References $lng.

134  {
135  return new self($a_ass, $a_user, $a_idl, $a_time, $lng, $a_team);
136  }
$lng

◆ getInstanceByIds()

static ilExcAssMemberState::getInstanceByIds (   $a_ass_id,
  $a_user_id = 0 
)
static

Get instance by IDs (recommended for consumer code)

Parameters
int$a_ass_idassignment id
int$a_user_iduser id
Returns
ilExcAssMemberState

Definition at line 100 of file class.ilExcAssMemberState.php.

References $DIC, $is_team, $lng, $member_id, ilExcIndividualDeadline\getInstance(), ilExAssignmentTeam\getInstanceByUserId(), and ilExAssignment\TYPE_UPLOAD_TEAM.

Referenced by ilExAssignmentInfo\__construct(), ilExSubmission\__construct(), ilCalendarScheduleFilterExercise\addCustomEvents(), ilExAssignmentGUI\addPublicSubmissions(), ilExAssignmentGUI\addSchedule(), ilExAssignmentGUI\addSubmission(), ilAppointmentPresentationExerciseGUI\collectPropertiesAndActions(), ilExSubmissionGUI\downloadFileObject(), ilExSubmissionGUI\downloadGlobalFeedbackFileObject(), ilAppointmentExerciseFileHandler\getFiles(), ilExAssignmentGUI\getOverviewBody(), ilExSubmissionTeamGUI\getOverviewContent(), ilExPeerReviewGUI\getOverviewContent(), ilExAssignmentGUI\getOverviewHeader(), ilBlogExerciseGUI\getSubmitButton(), ilPortfolioExerciseGUI\getSubmitButton(), ilExerciseDerivedTaskProvider\getTasks(), ilExAssignmentReminder\parsePeerReminders(), ilExAssignmentReminder\parseSubmissionReminders(), and ilObjExerciseGUI\startAssignmentObject().

101  {
102  global $DIC;
103 
104  $lng = $DIC->language();
105  $user = ($a_user_id > 0)
106  ? new ilObjUser($a_user_id)
107  : $DIC->user();
108 
109  $ass = new ilExAssignment($a_ass_id);
110 
111  $member_id = $user->getId();
112  $is_team = false;
113  $team = null;
114  if ($ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM) { // better move this to ilExcIndividualDeadline
115  $team = ilExAssignmentTeam::getInstanceByUserId($a_ass_id, $user->getId());
116  if ($team->getId()) {
117  $member_id = $team->getId();
118  $is_team = true;
119  }
120  }
121 
122  // note: team may be not null, but is_team still false
124 
125  return self::getInstance($ass, $user, $idl, time(), $lng, $team);
126  }
Exercise assignment.
$lng
static getInstanceByUserId($a_assignment_id, $a_user_id, $a_create_on_demand=false)
static getInstance($a_ass_id, $a_participant_id, $a_is_team=false)
Get instance.
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLastSubmissionOfRelativeDeadline()

ilExcAssMemberState::getLastSubmissionOfRelativeDeadline ( )

Get last submission for relative deadline.

Returns
int

Definition at line 236 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_RELATIVE.

Referenced by getLastSubmissionOfRelativeDeadlinePresentation().

237  {
238  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_RELATIVE) {
239  return $this->assignment->getRelDeadlineLastSubmission();
240  }
241  return 0;
242  }
+ Here is the caller graph for this function:

◆ getLastSubmissionOfRelativeDeadlinePresentation()

ilExcAssMemberState::getLastSubmissionOfRelativeDeadlinePresentation ( )

Get last submission for relative deadlines.

Returns
string

Definition at line 297 of file class.ilExcAssMemberState.php.

References getLastSubmissionOfRelativeDeadline(), and getTimePresentation().

298  {
299  if ($this->getLastSubmissionOfRelativeDeadline() > 0) {
301  }
302 
303  return "";
304  }
getLastSubmissionOfRelativeDeadline()
Get last submission for relative deadline.
getTimePresentation($a_timestamp)
Get common deadline presentation.
+ Here is the call graph for this function:

◆ getOfficialDeadline()

ilExcAssMemberState::getOfficialDeadline ( )

Get official deadline (individual deadline, fixed deadline or calculated deadline (using relative deadline and starting ts))

Grace period is not taken into account here.

Returns
int

Definition at line 265 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_ABSOLUTE, and getCalculatedDeadline().

Referenced by exceededOfficialDeadline(), getEffectiveDeadline(), getOfficialDeadlinePresentation(), getRemainingTimePresentation(), and inLateSubmissionPhase().

266  {
267  $dl = $this->idl->getIndividualDeadline(); // team or user individual deadline
268 
269  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_ABSOLUTE) { // absolute deadline
270  return max($this->assignment->getDeadline(), $dl); // take what's greater: idl or abs deadline
271  }
272 
273  // relative deadline: take max idl or calculated deadline
274  return max($this->getCalculatedDeadline(), $dl);
275  }
getCalculatedDeadline()
Calculated deadline is only given, if a relative deadline is given and the user started the assignmen...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOfficialDeadlinePresentation()

ilExcAssMemberState::getOfficialDeadlinePresentation ( )

Get official deadline presentation.

Returns
string

Definition at line 283 of file class.ilExcAssMemberState.php.

References getOfficialDeadline(), and getTimePresentation().

284  {
285  if ($this->getOfficialDeadline() > 0) {
286  return $this->getTimePresentation($this->getOfficialDeadline());
287  }
288 
289  return "";
290  }
getOfficialDeadline()
Get official deadline (individual deadline, fixed deadline or calculated deadline (using relative dea...
getTimePresentation($a_timestamp)
Get common deadline presentation.
+ Here is the call graph for this function:

◆ getPeerReviewDeadline()

ilExcAssMemberState::getPeerReviewDeadline ( )

Get peer review deadline.

Returns
int

Definition at line 415 of file class.ilExcAssMemberState.php.

Referenced by getPeerReviewDeadlinePresentation(), and isPeerReviewAllowed().

416  {
417  if ($this->assignment->getPeerReview() &&
418  $this->assignment->getPeerReviewDeadline()) {
419  return $this->assignment->getPeerReviewDeadline();
420  }
421  return 0;
422  }
+ Here is the caller graph for this function:

◆ getPeerReviewDeadlinePresentation()

ilExcAssMemberState::getPeerReviewDeadlinePresentation ( )

Get common deadline presentation.

Returns
string

Definition at line 429 of file class.ilExcAssMemberState.php.

References getPeerReviewDeadline(), and getTimePresentation().

430  {
431  if ($this->getPeerReviewDeadline() > 0) {
432  return $this->getTimePresentation($this->getPeerReviewDeadline());
433  }
434 
435  return "no peer review deadline";
436  }
getPeerReviewDeadline()
Get peer review deadline.
getTimePresentation($a_timestamp)
Get common deadline presentation.
+ Here is the call graph for this function:

◆ getRelativeDeadline()

ilExcAssMemberState::getRelativeDeadline ( )

Get relative deadline.

Returns
int

Definition at line 223 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_RELATIVE.

Referenced by getRelativeDeadlinePresentation().

224  {
225  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_RELATIVE) {
226  return $this->assignment->getRelativeDeadline();
227  }
228  return 0;
229  }
+ Here is the caller graph for this function:

◆ getRelativeDeadlinePresentation()

ilExcAssMemberState::getRelativeDeadlinePresentation ( )

Get relative deadline presentation.

Returns
string

Definition at line 250 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_RELATIVE, and getRelativeDeadline().

251  {
252  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_RELATIVE) {
253  return $this->getRelativeDeadline() . " " . $this->lng->txt("days");
254  }
255  return "";
256  }
getRelativeDeadline()
Get relative deadline.
+ Here is the call graph for this function:

◆ getRemainingTimePresentation()

ilExcAssMemberState::getRemainingTimePresentation ( )

Remaining time presentation (based on official deadline)

Parameters

Definition at line 328 of file class.ilExcAssMemberState.php.

References $lng, getOfficialDeadline(), IL_CAL_UNIX, and ilUtil\period2String().

329  {
330  $lng = $this->lng;
331  $official_deadline = $this->getOfficialDeadline();
332  if ($official_deadline == 0) {
333  return $lng->txt("exc_no_deadline_specified");
334  }
335  if ($official_deadline - $this->time <= 0) {
336  $time_str = $lng->txt("exc_time_over_short");
337  } else {
338  $time_str = ilUtil::period2String(new ilDateTime($official_deadline, IL_CAL_UNIX));
339  }
340 
341  return $time_str;
342  }
const IL_CAL_UNIX
$lng
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.
getOfficialDeadline()
Get official deadline (individual deadline, fixed deadline or calculated deadline (using relative dea...
+ Here is the call graph for this function:

◆ getTimePresentation()

ilExcAssMemberState::getTimePresentation (   $a_timestamp)
protected

Get common deadline presentation.

Returns
string

Definition at line 458 of file class.ilExcAssMemberState.php.

References ilDatePresentation\formatDate(), and IL_CAL_UNIX.

Referenced by getCommonDeadlinePresentation(), getGeneralStartPresentation(), getIndividualDeadlinePresentation(), getLastSubmissionOfRelativeDeadlinePresentation(), getOfficialDeadlinePresentation(), and getPeerReviewDeadlinePresentation().

459  {
460  if ($a_timestamp > 0) {
461  return ilDatePresentation::formatDate(new ilDateTime($a_timestamp, IL_CAL_UNIX));
462  }
463 
464  return "";
465  }
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasGenerallyStarted()

ilExcAssMemberState::hasGenerallyStarted ( )

Has started.

Returns
bool

Definition at line 192 of file class.ilExcAssMemberState.php.

Referenced by hasSubmissionStarted().

193  {
194  return !$this->assignment->notStartedYet();
195  }
+ Here is the caller graph for this function:

◆ hasSubmissionEnded()

ilExcAssMemberState::hasSubmissionEnded ( )

Check if the submission phase has ended for the current user.

Returns
bool

Definition at line 540 of file class.ilExcAssMemberState.php.

References getEffectiveDeadline().

Referenced by isSubmissionAllowed().

541  {
542  if ($this->getEffectiveDeadline() == 0) {
543  return false;
544  }
545 
546  if ($this->time > $this->getEffectiveDeadline()) {
547  return true;
548  }
549  return false;
550  }
getEffectiveDeadline()
Get effective deadline (max of official deadline and grace end period) for the user.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasSubmissionEndedForAllUsers()

ilExcAssMemberState::hasSubmissionEndedForAllUsers ( )

Has submission ended for all users.

Parameters

Definition at line 558 of file class.ilExcAssMemberState.php.

References getEffectiveDeadline().

Referenced by isGlobalFeedbackFileAccessible(), and isPeerReviewAllowed().

559  {
560  $global_subm_end = max($this->getEffectiveDeadline(), $this->assignment->getLastPersonalDeadline());
561 
562  if ($global_subm_end == 0) {
563  return false;
564  }
565 
566  if ($this->time > $global_subm_end) {
567  return true;
568  }
569  return false;
570  }
getEffectiveDeadline()
Get effective deadline (max of official deadline and grace end period) for the user.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasSubmissionStarted()

ilExcAssMemberState::hasSubmissionStarted ( )

Check if the submission phase has started for the current user.

(if the assignment is generally started and for relative deadlines, if the user started the assignment)

Returns
bool

Definition at line 526 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_ABSOLUTE, getIndividualStart(), and hasGenerallyStarted().

Referenced by areInstructionsVisible(), and isSubmissionAllowed().

527  {
528  if ($this->hasGenerallyStarted() && ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_ABSOLUTE ||
529  $this->getIndividualStart() > 0)) {
530  return true;
531  }
532  return false;
533  }
getIndividualStart()
Get individual start.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inLateSubmissionPhase()

ilExcAssMemberState::inLateSubmissionPhase ( )

Get late submission warning.

Parameters

Definition at line 507 of file class.ilExcAssMemberState.php.

References getOfficialDeadline(), and isSubmissionAllowed().

508  {
509  // official deadline is done, but submission still allowed
510  if ($this->getOfficialDeadline() &&
511  $this->getOfficialDeadline() < $this->time &&
512  $this->isSubmissionAllowed()) {
513  return true;
514  }
515  return false;
516  }
isSubmissionAllowed()
Is submission currently allowed.
getOfficialDeadline()
Get official deadline (individual deadline, fixed deadline or calculated deadline (using relative dea...
+ Here is the call graph for this function:

◆ isGlobalFeedbackFileAccessible()

ilExcAssMemberState::isGlobalFeedbackFileAccessible ( ilExSubmission  $submission)

Is global feedback file accessible?

Parameters
ilExSubmission$submission
Returns
bool

Definition at line 593 of file class.ilExcAssMemberState.php.

References ilExAssignment\FEEDBACK_DATE_CUSTOM, ilExAssignment\FEEDBACK_DATE_DEADLINE, hasSubmissionEndedForAllUsers(), and ilExSubmission\hasSubmitted().

594  {
595  $access = false;
596 
597  if (!$this->assignment->getFeedbackFile()) {
598  return false;
599  }
600 
601  // global feedback / sample solution
602  if ($this->assignment->getFeedbackDate() == ilExAssignment::FEEDBACK_DATE_DEADLINE) {
604  } elseif ($this->assignment->getFeedbackDate() == ilExAssignment::FEEDBACK_DATE_CUSTOM) {
605  $access = $this->assignment->afterCustomDate();
606  } else {
607  $access = $submission->hasSubmitted();
608  }
609 
610  return $access;
611  }
hasSubmissionEndedForAllUsers()
Has submission ended for all users.
+ Here is the call graph for this function:

◆ isPeerReviewAllowed()

ilExcAssMemberState::isPeerReviewAllowed ( )

Is submission currently allowed.

Returns
bool

Definition at line 443 of file class.ilExcAssMemberState.php.

References getPeerReviewDeadline(), and hasSubmissionEndedForAllUsers().

444  {
445  if ($this->assignment->getPeerReview() && $this->hasSubmissionEndedForAllUsers()
446  && ($this->getPeerReviewDeadline() == 0 || $this->getPeerReviewDeadline() > $this->time)) {
447  return true;
448  }
449 
450  return false;
451  }
getPeerReviewDeadline()
Get peer review deadline.
hasSubmissionEndedForAllUsers()
Has submission ended for all users.
+ Here is the call graph for this function:

◆ isSubmissionAllowed()

ilExcAssMemberState::isSubmissionAllowed ( )

Is submission currently allowed.

Parameters

Definition at line 580 of file class.ilExcAssMemberState.php.

References hasSubmissionEnded(), and hasSubmissionStarted().

Referenced by inLateSubmissionPhase().

581  {
582  if ($this->hasSubmissionStarted() && !$this->hasSubmissionEnded()) {
583  return true;
584  }
585  return false;
586  }
hasSubmissionEnded()
Check if the submission phase has ended for the current user.
hasSubmissionStarted()
Check if the submission phase has started for the current user.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ass_id

ilExcAssMemberState::$ass_id
protected

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

◆ $assignment

ilExcAssMemberState::$assignment
protected

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

◆ $is_team

ilExcAssMemberState::$is_team = false
protected

Definition at line 63 of file class.ilExcAssMemberState.php.

Referenced by getInstanceByIds().

◆ $member_id

ilExcAssMemberState::$member_id
protected

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

Referenced by getInstanceByIds().

◆ $team_id

ilExcAssMemberState::$team_id = 0
protected

Definition at line 58 of file class.ilExcAssMemberState.php.

◆ $user_id

ilExcAssMemberState::$user_id
protected

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


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