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();
77 $this->assignment = $a_ass;
80 $this->is_team =
false;
82 if ($a_team->getId()) {
83 $this->member_id = $a_team->
getId();
84 $this->team_id = $a_team->getId();
85 $this->is_team =
true;
103 $lng = $DIC->language();
104 $user = ($a_user_id > 0)
108 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
115 include_once(
"./Modules/Exercise/classes/class.ilExAssignmentTeam.php");
117 if ($team->getId()) {
124 include_once(
"./Modules/Exercise/classes/class.ilExcIndividualDeadline.php");
127 return self::getInstance($ass,
$user, $idl, time(),
$lng, $team);
137 return new self($a_ass, $a_user, $a_idl, $a_time,
$lng, $a_team);
159 return $this->assignment->getStartTime();
183 return $this->idl->getStartingTimestamp();
196 return !$this->assignment->notStartedYet();
206 $calculated_deadline = 0;
208 if ($this->idl->getStartingTimestamp() && $this->assignment->getRelativeDeadline()) {
209 $calculated_deadline = $this->idl->getStartingTimestamp() + ($this->assignment->getRelativeDeadline() * 24 * 60 * 60);
212 return $calculated_deadline;
223 return $this->assignment->getRelativeDeadline();
250 $dl = $this->idl->getIndividualDeadline();
253 return max($this->assignment->getDeadline(), $dl);
283 if ($od && $od < time()) {
299 if ($official_deadline == 0) {
300 return $lng->txt(
"exc_no_deadline_specified");
302 if ($official_deadline - $this->time <= 0) {
303 $time_str =
$lng->txt(
"exc_time_over_short");
319 return $this->idl->getIndividualDeadline();
347 return $this->assignment->getDeadline();
364 return "no deadline";
384 if ($this->assignment->getPeerReview() &&
385 $this->assignment->getPeerReviewDeadline()) {
386 return $this->assignment->getPeerReviewDeadline();
402 return "no peer review deadline";
427 if ($a_timestamp > 0) {
527 $global_subm_end = max($this->
getEffectiveDeadline(), $this->assignment->getLastPersonalDeadline());
529 if ($global_subm_end == 0) {
533 if ($this->time > $global_subm_end) {
564 if (!$this->assignment->getFeedbackFile()) {
572 $access = $this->assignment->afterCustomDate();
getCommonDeadlinePresentation()
Get common deadline presentation.
getIndividualStart()
Get individual start.
isSubmissionAllowed()
Is submission currently allowed.
exceededOfficialDeadline()
Check if official deadline exists and has ended.
getEffectiveDeadline()
Get effective deadline (max of official deadline and grace end period) for the user.
getId()
Get assignment id.
getGeneralStart()
Get general start.
inLateSubmissionPhase()
Get late submission warning.
getPeerReviewDeadline()
Get peer review deadline.
getOfficialDeadlinePresentation()
Get official deadline presentation.
hasSubmissionEnded()
Check if the submission phase has ended for the current user.
Exercise assignment team.
hasGenerallyStarted()
Has started.
getRelativeDeadline()
Get relative deadline.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static getInstanceByIds($a_ass_id, $a_user_id=0)
Get instance by IDs (recommended for consumer code)
Handles everything about the state (current phase) of a user in an assignment using assignment...
isPeerReviewAllowed()
Is submission currently allowed.
hasSubmissionStarted()
Check if the submission phase has started for the current user.
hasSubmissionEndedForAllUsers()
Has submission ended for all users.
getId()
get object id public
getGeneralStartPresentation()
Get start presentation.
static getInstanceByUserId($a_assignment_id, $a_user_id, $a_create_on_demand=false)
getIndividualDeadlinePresentation()
Get common deadline presentation.
static getInstance($a_ass_id, $a_participant_id, $a_is_team=false)
Get instance.
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.
__construct(ilExAssignment $a_ass, ilObjUser $a_user, ilExcIndividualDeadline $a_idl, $a_time, ilLanguage $lng, ilExAssignmentTeam $a_team=null)
ilExcAssMemberState constructor.
getCalculatedDeadline()
Calculated deadline is only given, if a relative deadline is given and the user started the assignmen...
getCommonDeadline()
Get common deadline (no individual deadline or grace period included)
getRemainingTimePresentation()
Remaining time presentation (based on official deadline)
getOfficialDeadline()
Get official deadline (individual deadline, fixed deadline or calculated deadline (using relative dea...
const FEEDBACK_DATE_DEADLINE
isGlobalFeedbackFileAccessible(ilExSubmission $submission)
Is global feedback file accessible?
getIndividualDeadlineObject()
Get individual deadline object.
getPeerReviewDeadlinePresentation()
Get common deadline presentation.
Exercise submission //TODO: This class has to much static methods related to delivered "files"...
const FEEDBACK_DATE_CUSTOM
getTimePresentation($a_timestamp)
Get common deadline presentation.
getIndividualDeadline()
Get individual deadline.
static getInstance(ilExAssignment $a_ass, ilObjUser $a_user, ilExcIndividualDeadline $a_idl, $a_time, ilLanguage $lng, ilExAssignmentTeam $a_team=null)
Get instance by dependencies.
getRelativeDeadlinePresentation()
Get relative deadline presentation.
areInstructionsVisible()
Instructions visible.