ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
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.

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 }
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_NOT_ATTEMPTED_NUM
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
User class.

References getMembersStorage(), ilIndividualAssessmentMembers\LP_COMPLETED, ilIndividualAssessmentMembers\LP_FAILED, ilLPStatus\LP_STATUS_IN_PROGRESS_NUM, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM.

Referenced by ilObjIndividualAssessmentAccess\checkCondition().

+ Here is the call graph for this function:
+ 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.

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 }

References getMembersStorage().

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

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

◆ getMembersStorage()

static ilIndividualAssessmentLPInterface::getMembersStorage ( )
staticprotected

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

66 {
67 global $DIC;
69 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28

References $DIC.

Referenced by determineStatusOfMember(), and getMembersHavingStatusIn().

+ Here is the caller graph for this function:

◆ isActiveLP()

static ilIndividualAssessmentLPInterface::isActiveLP ( int  $object_id)
static

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

86 : bool
87 {
88 return ilIndividualAssessmentLP::getInstance($object_id)->isActive();
89 }
static getInstance(int $obj_id)

References ilObjectLP\getInstance().

Referenced by ilObjIndividualAssessment\isActiveLP().

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

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)

References ilLPStatusWrapper\_updateStatus().

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

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

◆ updateLPStatusOfMember()

static ilIndividualAssessmentLPInterface::updateLPStatusOfMember ( ilIndividualAssessmentMember  $member)
static

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: