ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilIndividualAssessmentLPInterface Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ 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 ()
 

Static Protected Attributes

static ilIndividualAssessmentMembersStorageDB $members_storage = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM.

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

37  : int
38  {
39  if (self::$members_storage === null) {
40  self::$members_storage = self::getMembersStorage();
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  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const LP_STATUS_IN_PROGRESS_NUM
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 71 of file class.ilIndividualAssessmentLPInterface.php.

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

71  : array
72  {
73  if (self::$members_storage === null) {
74  self::$members_storage = self::getMembersStorage();
75  }
76  $members = self::$members_storage->loadMembers(new ilObjIndividualAssessment($iass_id, false));
77  $return = array();
78  foreach ($members as $usr_id => $record) {
79  if (self::determineStatusOfMember($iass_id, $usr_id) === $status) {
80  $return[] = $usr_id;
81  }
82  }
83  return $return;
84  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getMembersStorage()

static ilIndividualAssessmentLPInterface::getMembersStorage ( )
staticprotected

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

References $DIC.

66  {
67  global $DIC;
68  return new ilIndividualAssessmentMembersStorageDB($DIC['ilDB']);
69  }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ isActiveLP()

static ilIndividualAssessmentLPInterface::isActiveLP ( int  $object_id)
static

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

References ilObjectLP\getInstance().

Referenced by ilObjIndividualAssessment\isActiveLP().

86  : bool
87  {
88  return ilIndividualAssessmentLP::getInstance($object_id)->isActive();
89  }
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: