ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 17 of file class.ilIndividualAssessmentLPInterface.php.

References array, 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().

17  {
18  if(self::$members_storage === null) {
19  self::$members_storage = self::getMembersStorage();
20  }
21  $iass = new ilObjIndividualAssessment($iass_id,false);
22  $members = $iass->loadMembers($iass);
23  $usr = new ilObjUser($usr_id);
24  if($members->userAllreadyMember($usr)) {
25  $member = self::$members_storage->loadMember($iass ,$usr);
26  if($member->finalized()) {
27  return $member->LPStatus();
30  }
31  }
33  }
For the purpose of streamlining the grading and learning-process status definition outside of tests...
const LP_STATUS_IN_PROGRESS_NUM
Create styles array
The data for the language used.
const LP_STATUS_NOT_ATTEMPTED_NUM
+ Here is the caller graph for this function:

◆ getMembersHavingStatusIn()

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

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

References array.

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

40  {
41  if(self::$members_storage === null) {
42  self::$members_storage = self::getMembersStorage();
43  }
44  $members = self::$members_storage->loadMembers(new ilObjIndividualAssessment($iass_id,false));
45  $return = array();
46  foreach($members as $usr_id => $record) {
47  if((string)self::determineStatusOfMember($iass_id,$usr_id) === (string)$status) {
48  $return[] = $usr_id;
49  }
50  }
51  return $return;
52  }
For the purpose of streamlining the grading and learning-process status definition outside of tests...
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getMembersStorage()

static ilIndividualAssessmentLPInterface::getMembersStorage ( )
staticprotected

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

References $DIC.

35  {
36  global $DIC;
37  return new ilIndividualAssessmentMembersStorageDB($DIC['ilDB']);
38  }
global $DIC

◆ isActiveLP()

static ilIndividualAssessmentLPInterface::isActiveLP (   $a_object_id)
static

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

References ilObjectLP\getInstance().

Referenced by ilObjIndividualAssessment\isActiveLP().

54  {
55  require_once 'Modules/IndividualAssessment/classes/class.ilIndividualAssessmentLP.php';
56  return ilIndividualAssessmentLP::getInstance($a_object_id)->isActive();
57  }
static getInstance($a_obj_id)
+ 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 13 of file class.ilIndividualAssessmentLPInterface.php.

References ilLPStatusWrapper\_refreshStatus().

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

13  {
14  ilLPStatusWrapper::_refreshStatus($iass_id, $usr_ids);
15  }
static _refreshStatus($a_obj_id, $a_users=null)
Set dirty.
+ 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 8 of file class.ilIndividualAssessmentLPInterface.php.

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

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

8  {
10  }
static _refreshStatus($a_obj_id, $a_users=null)
Set dirty.
Create styles array
The data for the language used.
assessmentId()
Get the ilObjIndividualAssessment id corresponding to this membership.
id()
Get the user id corresponding to this membership.
+ 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 6 of file class.ilIndividualAssessmentLPInterface.php.


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