ILIAS  release_7 Revision v7.30-3-g800a261c036
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.

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 @access public
$lng

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

+ 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.

473 {
474 return $this->hasSubmissionStarted();
475 }
hasSubmissionStarted()
Check if the submission phase has started for the current user.

References hasSubmissionStarted().

+ 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.

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...

References getOfficialDeadline().

+ 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.

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 }

References ilExAssignment\DEADLINE_RELATIVE.

Referenced by getCommonDeadline(), and getOfficialDeadline().

+ 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.

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...

References ilExAssignment\DEADLINE_ABSOLUTE, and getCalculatedDeadline().

Referenced by getCommonDeadlinePresentation().

+ 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.

392 {
393 if ($this->getCommonDeadline() > 0) {
394 return $this->getTimePresentation($this->getCommonDeadline());
395 }
396
397 return "no deadline";
398 }
getTimePresentation($a_timestamp)
Get common deadline presentation.
getCommonDeadline()
Get common deadline (no individual deadline or grace period included)

References getCommonDeadline(), and getTimePresentation().

+ 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.

406 {
407 return max($this->getOfficialDeadline(), $this->assignment->getExtendedDeadline());
408 }

References getOfficialDeadline().

Referenced by hasSubmissionEnded(), and hasSubmissionEndedForAllUsers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGeneralStart()

ilExcAssMemberState::getGeneralStart ( )

Get general start.

Parameters

return

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

156 {
157 return $this->assignment->getStartTime();
158 }

Referenced by getGeneralStartPresentation().

+ 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.

166 {
167 if ($this->getGeneralStart()) {
168 return $this->getTimePresentation($this->getGeneralStart());
169 }
170 return "";
171 }
getGeneralStart()
Get general start.

References getGeneralStart(), and getTimePresentation().

+ 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.

350 {
351 if ($this->idl->getIndividualDeadline() > $this->getCommonDeadline()) {
352 return $this->idl->getIndividualDeadline();
353 }
354 return 0;
355 }

Referenced by getIndividualDeadlinePresentation().

+ 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.

364 {
365 if ($this->getIndividualDeadline() > 0) {
366 return $this->getTimePresentation($this->getIndividualDeadline());
367 }
368
369 return "";
370 }
getIndividualDeadline()
Get individual deadline.

References getIndividualDeadline(), and getTimePresentation().

+ 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.

179 {
180 if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_RELATIVE) {
181 return $this->idl->getStartingTimestamp();
182 }
183 return 0;
184 }

References ilExAssignment\DEADLINE_RELATIVE.

◆ 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.

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

References $lng.

Referenced by getInstanceByIds().

+ Here is the caller graph for this function:

◆ 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.

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 }
static getInstanceByUserId($a_assignment_id, $a_user_id, $a_create_on_demand=false)
Exercise assignment.
static getInstance(ilExAssignment $a_ass, ilObjUser $a_user, ilExcIndividualDeadline $a_idl, $a_time, ilLanguage $lng, ilExAssignmentTeam $a_team=null)
Get instance by dependencies.
static getInstance($a_ass_id, $a_participant_id, $a_is_team=false)
Get instance.
global $DIC
Definition: goto.php:24

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

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

+ 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.

237 {
238 if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_RELATIVE) {
239 return $this->assignment->getRelDeadlineLastSubmission();
240 }
241 return 0;
242 }

References ilExAssignment\DEADLINE_RELATIVE.

Referenced by getLastSubmissionOfRelativeDeadlinePresentation().

+ 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.

298 {
299 if ($this->getLastSubmissionOfRelativeDeadline() > 0) {
301 }
302
303 return "";
304 }
getLastSubmissionOfRelativeDeadline()
Get last submission for relative deadline.

References getLastSubmissionOfRelativeDeadline(), and getTimePresentation().

+ 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.

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 }

References ilExAssignment\DEADLINE_ABSOLUTE, and getCalculatedDeadline().

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

+ 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.

284 {
285 if ($this->getOfficialDeadline() > 0) {
286 return $this->getTimePresentation($this->getOfficialDeadline());
287 }
288
289 return "";
290 }

References getOfficialDeadline(), and getTimePresentation().

+ 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.

416 {
417 if ($this->assignment->getPeerReview() &&
418 $this->assignment->getPeerReviewDeadline()) {
419 return $this->assignment->getPeerReviewDeadline();
420 }
421 return 0;
422 }

Referenced by getPeerReviewDeadlinePresentation().

+ 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.

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.

References getPeerReviewDeadline(), and getTimePresentation().

+ 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.

224 {
225 if ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_RELATIVE) {
226 return $this->assignment->getRelativeDeadline();
227 }
228 return 0;
229 }

References ilExAssignment\DEADLINE_RELATIVE.

Referenced by getRelativeDeadlinePresentation().

+ 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.

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.

References ilExAssignment\DEADLINE_RELATIVE, and getRelativeDeadline().

+ Here is the call graph for this function:

◆ getRemainingTimePresentation()

ilExcAssMemberState::getRemainingTimePresentation ( )

Remaining time presentation (based on official deadline)

Parameters

return string

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

329 {
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
@classDescription Date and time handling
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.

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

+ 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.

459 {
460 if ($a_timestamp > 0) {
461 return ilDatePresentation::formatDate(new ilDateTime($a_timestamp, IL_CAL_UNIX));
462 }
463
464 return "";
465 }
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.

References ilDatePresentation\formatDate(), and IL_CAL_UNIX.

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

+ 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.

193 {
194 return !$this->assignment->notStartedYet();
195 }

Referenced by hasSubmissionStarted().

+ 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.

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.

References getEffectiveDeadline().

Referenced by isSubmissionAllowed().

+ 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

return

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

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 }

References getEffectiveDeadline().

Referenced by isGlobalFeedbackFileAccessible().

+ 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.

527 {
528 if ($this->hasGenerallyStarted() && ($this->assignment->getDeadlineMode() == ilExAssignment::DEADLINE_ABSOLUTE ||
529 $this->getIndividualStart() > 0)) {
530 return true;
531 }
532 return false;
533 }

References ilExAssignment\DEADLINE_ABSOLUTE, and hasGenerallyStarted().

Referenced by areInstructionsVisible(), and isSubmissionAllowed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inLateSubmissionPhase()

ilExcAssMemberState::inLateSubmissionPhase ( )

Get late submission warning.

Parameters

return In late submission phase

Parameters

return

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

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.

References getOfficialDeadline(), and isSubmissionAllowed().

+ 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.

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) {
603 $access = $this->hasSubmissionEndedForAllUsers();
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.

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

+ 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.

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 }

◆ isSubmissionAllowed()

ilExcAssMemberState::isSubmissionAllowed ( )

Is submission currently allowed.

Parameters

return

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

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.

References hasSubmissionEnded(), and hasSubmissionStarted().

Referenced by inLateSubmissionPhase().

+ 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: