ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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. More...
 
 getRelativeDeadline ()
 Get 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...
 
 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
  • Calculated Deadline: Starting Timestamp + Relative Deadline
  • 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 32 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 69 of file class.ilExcAssMemberState.php.

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

70  {
71  $this->time = $a_time;
72  $this->ass_id = $a_ass->getId();
73  $this->user_id = $a_user->getId();
74  $this->member_id = $a_user->getId();
75  $this->lng = $lng;
76 
77  $this->assignment = $a_ass;
78 
79  // check team status
80  $this->is_team = false;
81  if ($this->assignment->getType() == ilExAssignment::TYPE_UPLOAD_TEAM) {
82  if ($a_team->getId()) {
83  $this->member_id = $a_team->getId();
84  $this->team_id = $a_team->getId();
85  $this->is_team = true;
86  }
87  }
88 
89  $this->idl = $a_idl;
90  }
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 439 of file class.ilExcAssMemberState.php.

References hasSubmissionStarted().

440  {
441  return $this->hasSubmissionStarted();
442  }
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 280 of file class.ilExcAssMemberState.php.

References getOfficialDeadline().

281  {
282  $od = $this->getOfficialDeadline();
283  if ($od && $od < time()) {
284  return true;
285  }
286  return false;
287  }
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.

Returns
int

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

References ilExAssignment\DEADLINE_RELATIVE.

Referenced by getCommonDeadline(), and getOfficialDeadline().

205  {
206  $calculated_deadline = 0;
207  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_RELATIVE) {
208  if ($this->idl->getStartingTimestamp() && $this->assignment->getRelativeDeadline()) {
209  $calculated_deadline = $this->idl->getStartingTimestamp() + ($this->assignment->getRelativeDeadline() * 24 * 60 * 60);
210  }
211  }
212  return $calculated_deadline;
213  }
+ 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 344 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_ABSOLUTE, and getCalculatedDeadline().

Referenced by getCommonDeadlinePresentation(), and getIndividualDeadline().

345  {
346  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_ABSOLUTE) { // absolute deadline
347  return $this->assignment->getDeadline();
348  }
349 
350  return $this->getCalculatedDeadline();
351  }
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 358 of file class.ilExcAssMemberState.php.

References getCommonDeadline(), and getTimePresentation().

359  {
360  if ($this->getCommonDeadline() > 0) {
361  return $this->getTimePresentation($this->getCommonDeadline());
362  }
363 
364  return "no deadline";
365  }
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 372 of file class.ilExcAssMemberState.php.

References getOfficialDeadline().

Referenced by hasSubmissionEnded(), and hasSubmissionEndedForAllUsers().

373  {
374  return max($this->getOfficialDeadline(), $this->assignment->getExtendedDeadline());
375  }
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 157 of file class.ilExcAssMemberState.php.

Referenced by getGeneralStartPresentation().

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

◆ getGeneralStartPresentation()

ilExcAssMemberState::getGeneralStartPresentation ( )

Get start presentation.

Returns
string

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

References getGeneralStart(), and getTimePresentation().

168  {
169  if ($this->getGeneralStart()) {
170  return $this->getTimePresentation($this->getGeneralStart());
171  }
172  return "";
173  }
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 316 of file class.ilExcAssMemberState.php.

References getCommonDeadline().

Referenced by getIndividualDeadlinePresentation().

317  {
318  if ($this->idl->getIndividualDeadline() > $this->getCommonDeadline()) {
319  return $this->idl->getIndividualDeadline();
320  }
321  return 0;
322  }
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 145 of file class.ilExcAssMemberState.php.

146  {
147  return $this->idl;
148  }

◆ getIndividualDeadlinePresentation()

ilExcAssMemberState::getIndividualDeadlinePresentation ( )

Get common deadline presentation.

Returns
string

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

References getIndividualDeadline(), and getTimePresentation().

331  {
332  if ($this->getIndividualDeadline() > 0) {
333  return $this->getTimePresentation($this->getIndividualDeadline());
334  }
335 
336  return "";
337  }
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 180 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_RELATIVE.

Referenced by hasSubmissionStarted().

181  {
182  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_RELATIVE) {
183  return $this->idl->getStartingTimestamp();
184  }
185  return 0;
186  }
+ 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 135 of file class.ilExcAssMemberState.php.

References $lng.

136  {
137  return new self($a_ass, $a_user, $a_idl, $a_time, $lng, $a_team);
138  }
$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 99 of file class.ilExcAssMemberState.php.

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

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

100  {
101  global $DIC;
102 
103  $lng = $DIC->language();
104  $user = ($a_user_id > 0)
105  ? new ilObjUser($a_user_id)
106  : $DIC->user();
107 
108  include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
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  include_once("./Modules/Exercise/classes/class.ilExAssignmentTeam.php");
116  $team = ilExAssignmentTeam::getInstanceByUserId($a_ass_id, $user->getId());
117  if ($team->getId()) {
118  $member_id = $team->getId();
119  $is_team = true;
120  }
121  }
122 
123  // note: team may be not null, but is_team still false
124  include_once("./Modules/Exercise/classes/class.ilExcIndividualDeadline.php");
126 
127  return self::getInstance($ass, $user, $idl, time(), $lng, $team);
128  }
Exercise assignment.
global $DIC
Definition: saml.php:7
$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.
$user
Definition: migrateto20.php:57
+ Here is the call graph for this function:
+ Here is the caller 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 248 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_ABSOLUTE, and getCalculatedDeadline().

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

249  {
250  $dl = $this->idl->getIndividualDeadline(); // team or user individual deadline
251 
252  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_ABSOLUTE) { // absolute deadline
253  return max($this->assignment->getDeadline(), $dl); // take what's greater: idl or abs deadline
254  }
255 
256  // relative deadline: take max idl or calculated deadline
257  return max($this->getCalculatedDeadline(), $dl);
258  }
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 266 of file class.ilExcAssMemberState.php.

References getOfficialDeadline(), and getTimePresentation().

267  {
268  if ($this->getOfficialDeadline() > 0) {
269  return $this->getTimePresentation($this->getOfficialDeadline());
270  }
271 
272  return "";
273  }
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 382 of file class.ilExcAssMemberState.php.

Referenced by getPeerReviewDeadlinePresentation(), and isPeerReviewAllowed().

383  {
384  if ($this->assignment->getPeerReview() &&
385  $this->assignment->getPeerReviewDeadline()) {
386  return $this->assignment->getPeerReviewDeadline();
387  }
388  return 0;
389  }
+ Here is the caller graph for this function:

◆ getPeerReviewDeadlinePresentation()

ilExcAssMemberState::getPeerReviewDeadlinePresentation ( )

Get common deadline presentation.

Returns
string

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

References getPeerReviewDeadline(), and getTimePresentation().

397  {
398  if ($this->getPeerReviewDeadline() > 0) {
399  return $this->getTimePresentation($this->getPeerReviewDeadline());
400  }
401 
402  return "no peer review deadline";
403  }
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 220 of file class.ilExcAssMemberState.php.

References ilExAssignment\DEADLINE_RELATIVE.

Referenced by getRelativeDeadlinePresentation().

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

◆ getRelativeDeadlinePresentation()

ilExcAssMemberState::getRelativeDeadlinePresentation ( )

Get relative deadline presentation.

Returns
string

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

References ilExAssignment\DEADLINE_RELATIVE, and getRelativeDeadline().

234  {
235  if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_RELATIVE) {
236  return $this->getRelativeDeadline() . " " . $this->lng->txt("days");
237  }
238  return "";
239  }
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 295 of file class.ilExcAssMemberState.php.

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

296  {
297  $lng = $this->lng;
298  $official_deadline = $this->getOfficialDeadline();
299  if ($official_deadline == 0) {
300  return $lng->txt("exc_no_deadline_specified");
301  }
302  if ($official_deadline - $this->time <= 0) {
303  $time_str = $lng->txt("exc_time_over_short");
304  } else {
305  $time_str = ilUtil::period2String(new ilDateTime($official_deadline, IL_CAL_UNIX));
306  }
307 
308  return $time_str;
309  }
const IL_CAL_UNIX
$lng
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.
Date and time handling
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 425 of file class.ilExcAssMemberState.php.

References ilDatePresentation\formatDate(), and IL_CAL_UNIX.

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

426  {
427  if ($a_timestamp > 0) {
428  return ilDatePresentation::formatDate(new ilDateTime($a_timestamp, IL_CAL_UNIX));
429  }
430 
431  return "";
432  }
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
Date and time handling
+ 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 194 of file class.ilExcAssMemberState.php.

Referenced by hasSubmissionStarted().

195  {
196  return !$this->assignment->notStartedYet();
197  }
+ 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 507 of file class.ilExcAssMemberState.php.

References getEffectiveDeadline().

Referenced by isSubmissionAllowed().

508  {
509  if ($this->getEffectiveDeadline() == 0) {
510  return false;
511  }
512 
513  if ($this->time > $this->getEffectiveDeadline()) {
514  return true;
515  }
516  return false;
517  }
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 525 of file class.ilExcAssMemberState.php.

References getEffectiveDeadline().

Referenced by isGlobalFeedbackFileAccessible(), and isPeerReviewAllowed().

526  {
527  $global_subm_end = max($this->getEffectiveDeadline(), $this->assignment->getLastPersonalDeadline());
528 
529  if ($global_subm_end == 0) {
530  return false;
531  }
532 
533  if ($this->time > $global_subm_end) {
534  return true;
535  }
536  return false;
537  }
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 493 of file class.ilExcAssMemberState.php.

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

Referenced by areInstructionsVisible(), and isSubmissionAllowed().

494  {
495  if ($this->hasGenerallyStarted() && ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_ABSOLUTE ||
496  $this->getIndividualStart() > 0)) {
497  return true;
498  }
499  return false;
500  }
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 474 of file class.ilExcAssMemberState.php.

References getOfficialDeadline(), and isSubmissionAllowed().

475  {
476  // official deadline is done, but submission still allowed
477  if ($this->getOfficialDeadline() &&
478  $this->getOfficialDeadline() < $this->time &&
479  $this->isSubmissionAllowed()) {
480  return true;
481  }
482  return false;
483  }
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 560 of file class.ilExcAssMemberState.php.

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

561  {
562  $access = false;
563 
564  if (!$this->assignment->getFeedbackFile()) {
565  return false;
566  }
567 
568  // global feedback / sample solution
569  if ($this->assignment->getFeedbackDate() == ilExAssignment::FEEDBACK_DATE_DEADLINE) {
570  $access = $this->hasSubmissionEndedForAllUsers();
571  } elseif ($this->assignment->getFeedbackDate() == ilExAssignment::FEEDBACK_DATE_CUSTOM) {
572  $access = $this->assignment->afterCustomDate();
573  } else {
574  $access = $submission->hasSubmitted();
575  }
576 
577  return $access;
578  }
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 410 of file class.ilExcAssMemberState.php.

References $time, getPeerReviewDeadline(), and hasSubmissionEndedForAllUsers().

411  {
412  if ($this->assignment->getPeerReview() && $this->hasSubmissionEndedForAllUsers()
413  && ($this->getPeerReviewDeadline() == 0 || $this->getPeerReviewDeadline() > $this->time)) {
414  return true;
415  }
416 
417  return false;
418  }
getPeerReviewDeadline()
Get peer review deadline.
$time
Definition: cron.php:21
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 547 of file class.ilExcAssMemberState.php.

References hasSubmissionEnded(), and hasSubmissionStarted().

Referenced by inLateSubmissionPhase().

548  {
549  if ($this->hasSubmissionStarted() && !$this->hasSubmissionEnded()) {
550  return true;
551  }
552  return false;
553  }
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 37 of file class.ilExcAssMemberState.php.

◆ $assignment

ilExcAssMemberState::$assignment
protected

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

◆ $is_team

ilExcAssMemberState::$is_team = false
protected

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

Referenced by getInstanceByIds().

◆ $member_id

ilExcAssMemberState::$member_id
protected

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

Referenced by getInstanceByIds().

◆ $team_id

ilExcAssMemberState::$team_id = 0
protected

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

◆ $user_id

ilExcAssMemberState::$user_id
protected

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


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