ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilIndividualAssessmentLPInterface Class Reference
+ Collaboration diagram for ilIndividualAssessmentLPInterface:

Static Public Member Functions

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

Static Protected Member Functions

static getMembersStorage ()
 

Static Protected Attributes

static $members_storage = null
 

Detailed Description

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

Member Function Documentation

◆ determineStatusOfMember()

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

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

21 {
22 if (self::$members_storage === null) {
23 self::$members_storage = self::getMembersStorage();
24 }
25 $iass = new ilObjIndividualAssessment($iass_id, false);
26 $members = $iass->loadMembers($iass);
27 $usr = new ilObjUser($usr_id);
28 if ($members->userAllreadyMember($usr)) {
29 $member = self::$members_storage->loadMember($iass, $usr);
30 if ($member->finalized()) {
31 return $member->LPStatus();
32 } elseif (in_array($member->LPStatus(), array(ilIndividualAssessmentMembers::LP_FAILED, ilIndividualAssessmentMembers::LP_COMPLETED))) {
34 }
35 }
37 }
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_NOT_ATTEMPTED_NUM
For the purpose of streamlining the grading and learning-process status definition outside of tests,...

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(), and ilLPStatusIndividualAssessment\determineStatus().

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

◆ getMembersHavingStatusIn()

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

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

46 {
47 if (self::$members_storage === null) {
48 self::$members_storage = self::getMembersStorage();
49 }
50 $members = self::$members_storage->loadMembers(new ilObjIndividualAssessment($iass_id, false));
51 $return = array();
52 foreach ($members as $usr_id => $record) {
53 if ((string) self::determineStatusOfMember($iass_id, $usr_id) === (string) $status) {
54 $return[] = $usr_id;
55 }
56 }
57 return $return;
58 }

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 39 of file class.ilIndividualAssessmentLPInterface.php.

40 {
41 global $DIC;
43 }
global $DIC
Definition: saml.php:7

References $DIC.

Referenced by determineStatusOfMember(), and getMembersHavingStatusIn().

+ Here is the caller graph for this function:

◆ isActiveLP()

static ilIndividualAssessmentLPInterface::isActiveLP (   $a_object_id)
static

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

61 {
62 require_once 'Modules/IndividualAssessment/classes/class.ilIndividualAssessmentLP.php';
63 return ilIndividualAssessmentLP::getInstance($a_object_id)->isActive();
64 }
static getInstance($a_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 (   $iass_id,
array  $usr_ids 
)
static

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

16 {
17 ilLPStatusWrapper::_refreshStatus($iass_id, $usr_ids);
18 }
static _refreshStatus($a_obj_id, $a_users=null)
Set dirty.

References ilLPStatusWrapper\_refreshStatus().

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

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

10 {
11 ilLPStatusWrapper::_refreshStatus($member->assessmentId(), array($member->id()));
12 }
assessmentId()
Get the ilObjIndividualAssessment id corresponding to this membership.
id()
Get the user id corresponding to this membership.

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

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

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

Field Documentation

◆ $members_storage

ilIndividualAssessmentLPInterface::$members_storage = null
staticprotected

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


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