ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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.

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

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();
34  }
35  }
37  }
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 45 of file class.ilIndividualAssessmentLPInterface.php.

References array.

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

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

References $DIC.

40  {
41  global $DIC;
42  return new ilIndividualAssessmentMembersStorageDB($DIC['ilDB']);
43  }
global $DIC
Definition: saml.php:7

◆ isActiveLP()

static ilIndividualAssessmentLPInterface::isActiveLP (   $a_object_id)
static

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

References ilObjectLP\getInstance().

Referenced by ilObjIndividualAssessment\isActiveLP().

61  {
62  require_once 'Modules/IndividualAssessment/classes/class.ilIndividualAssessmentLP.php';
63  return ilIndividualAssessmentLP::getInstance($a_object_id)->isActive();
64  }
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 15 of file class.ilIndividualAssessmentLPInterface.php.

References ilLPStatusWrapper\_refreshStatus().

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

16  {
17  ilLPStatusWrapper::_refreshStatus($iass_id, $usr_ids);
18  }
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 9 of file class.ilIndividualAssessmentLPInterface.php.

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

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

10  {
11  ilLPStatusWrapper::_refreshStatus($member->assessmentId(), array($member->id()));
12  }
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 7 of file class.ilIndividualAssessmentLPInterface.php.


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