ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilIndividualAssessmentLPInterface Class Reference
+ Collaboration diagram for ilIndividualAssessmentLPInterface:

Static Public Member Functions

static updateLPStatusOfMember (ilIndividualAssessmentMember $member)
 
static updateLPStatusByIds (int $iass_id, array $usr_ids)
 
static determineStatusOfMember (int $iass_id, int $usr_id)
 
static getMembersHavingStatusIn (int $iass_id, int $status)
 
static isActiveLP (int $object_id)
 

Static Protected Member Functions

static getMembersStorage (int $iass_id)
 

Static Protected Attributes

static ilIndividualAssessmentMembersStorageDB $members_storage = null
 

Detailed Description

Definition at line 21 of file class.ilIndividualAssessmentLPInterface.php.

Member Function Documentation

◆ determineStatusOfMember()

static ilIndividualAssessmentLPInterface::determineStatusOfMember ( int  $iass_id,
int  $usr_id 
)
static

Definition at line 37 of file class.ilIndividualAssessmentLPInterface.php.

References ilIndividualAssessmentMembers\LP_COMPLETED, ilIndividualAssessmentMembers\LP_FAILED, ilLPStatus\LP_STATUS_IN_PROGRESS_NUM, ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM, and null.

Referenced by ilObjIndividualAssessmentAccess\checkCondition(), and ilLPStatusIndividualAssessment\determineStatus().

37  : int
38  {
39  if (self::$members_storage === null) {
40  self::$members_storage = self::getMembersStorage($iass_id);
41  }
42 
43  $iass = new ilObjIndividualAssessment($iass_id, false);
44  $members = $iass->loadMembers();
45  $usr = new ilObjUser($usr_id);
46 
47  if ($members->userAllreadyMember($usr)) {
48  $member = self::$members_storage->loadMember($iass, $usr);
49 
50  if ($member->finalized()) {
51  return $member->LPStatus();
52  } elseif (
53  in_array($member->LPStatus(), [
56  ])
57  ) {
59  }
60  }
61 
63  }
For the purpose of streamlining the grading and learning-process status definition outside of tests...
const LP_STATUS_IN_PROGRESS_NUM
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const LP_STATUS_NOT_ATTEMPTED_NUM
+ Here is the caller graph for this function:

◆ getMembersHavingStatusIn()

static ilIndividualAssessmentLPInterface::getMembersHavingStatusIn ( int  $iass_id,
int  $status 
)
static

Definition at line 73 of file class.ilIndividualAssessmentLPInterface.php.

References null.

Referenced by ilLPStatusIndividualAssessment\_getCompleted(), ilLPStatusIndividualAssessment\_getFailed(), ilLPStatusIndividualAssessment\_getInProgress(), and ilLPStatusIndividualAssessment\_getNotAttempted().

73  : array
74  {
75  if (self::$members_storage === null) {
76  self::$members_storage = self::getMembersStorage($iass_id);
77  }
78  $members = self::$members_storage->loadMembers(new ilObjIndividualAssessment($iass_id, false));
79  $return = array();
80  foreach ($members as $usr_id => $record) {
81  if (self::determineStatusOfMember($iass_id, $usr_id) === $status) {
82  $return[] = $usr_id;
83  }
84  }
85  return $return;
86  }
For the purpose of streamlining the grading and learning-process status definition outside of tests...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getMembersStorage()

static ilIndividualAssessmentLPInterface::getMembersStorage ( int  $iass_id)
staticprotected

Definition at line 65 of file class.ilIndividualAssessmentLPInterface.php.

References $DIC, and $dic.

66  {
67  global $DIC;
68  $iass = new ilObjIndividualAssessment($iass_id, false);
69  $dic = $iass->getObjectDIC($iass, $DIC);
70  return $dic['iass.member.storage'];
71  }
For the purpose of streamlining the grading and learning-process status definition outside of tests...
global $DIC
Definition: shib_login.php:26
$dic
Definition: result.php:31

◆ isActiveLP()

static ilIndividualAssessmentLPInterface::isActiveLP ( int  $object_id)
static

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

References ilObjectLP\getInstance().

Referenced by ilObjIndividualAssessment\isActiveLP().

88  : bool
89  {
90  return ilIndividualAssessmentLP::getInstance($object_id)->isActive();
91  }
static getInstance(int $obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLPStatusByIds()

static ilIndividualAssessmentLPInterface::updateLPStatusByIds ( int  $iass_id,
array  $usr_ids 
)
static

Definition at line 30 of file class.ilIndividualAssessmentLPInterface.php.

References ilLPStatusWrapper\_updateStatus().

Referenced by ilIndividualAssessmentMembersGUI\addUsers(), and ilIndividualAssessmentMembersGUI\removeUser().

30  : void
31  {
32  foreach ($usr_ids as $usr_id) {
33  ilLPStatusWrapper::_updateStatus($iass_id, $usr_id);
34  }
35  }
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLPStatusOfMember()

static ilIndividualAssessmentLPInterface::updateLPStatusOfMember ( ilIndividualAssessmentMember  $member)
static

Definition at line 25 of file class.ilIndividualAssessmentLPInterface.php.

References ilLPStatusWrapper\_updateStatus(), ilIndividualAssessmentMember\assessmentId(), and ilIndividualAssessmentMember\id().

Referenced by ilIndividualAssessmentMemberGUI\edit(), ilIndividualAssessmentMemberGUI\finalize(), and ilIndividualAssessmentMemberGUI\saveAmend().

25  : void
26  {
27  ilLPStatusWrapper::_updateStatus($member->assessmentId(), $member->id());
28  }
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $members_storage

ilIndividualAssessmentMembersStorageDB ilIndividualAssessmentLPInterface::$members_storage = null
staticprotected

Definition at line 23 of file class.ilIndividualAssessmentLPInterface.php.


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