ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilGroupLP Class Reference
+ Inheritance diagram for ilGroupLP:
+ Collaboration diagram for ilGroupLP:

Public Member Functions

 getDefaultMode ()
 
 getValidModes ()
 
 getMembers (bool $a_search=true)
 
- Public Member Functions inherited from ilObjectLP
 resetCaches ()
 
 isAnonymized ()
 
 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
 isActive ()
 
 getModeText (int $mode)
 
 getModeInfoText (int $mode)
 
 getSettingsInfo ()
 
 getCollectionInstance ()
 
 getMembers (bool $search=true)
 
 resetLPDataForCompleteObject (bool $recursive=true)
 
 resetLPDataForUserIds (array $user_ids, bool $recursive=true)
 
 handleToTrash ()
 
 handleDelete ()
 
 getMailTemplateId ()
 
 hasIndividualModeOptions ()
 
 initInvidualModeOptions ()
 Post vars for input groups is taken from array keys. More...
 
 shouldFetchIndividualModeFromFormSubmission ()
 
 fetchIndividualModeFromFormSubmission (string $selected_group, array $group_data)
 
 appendModeConfiguration (int $mode)
 
 saveModeConfiguration (string $selected_group, array $group_data, bool &$modeChanged)
 

Static Public Member Functions

static getDefaultModes (bool $a_lp_active)
 Get available type-specific default modes (no administration needed) More...
 
- Static Public Member Functions inherited from ilObjectLP
static getInstance (int $obj_id)
 
static getTypeClass (string $type)
 
static getSupportedObjectTypes ()
 
static isSupportedObjectType (string $type)
 
static handleMove (int $source_ref_id)
 
static getLPMemberships (int $usr_id, array $obj_ids, ?int $parent_ref_id=null, bool $mapped_ref_ids=false)
 Get all objects where given user is member (from LP POV) More...
 
static supportsSpentSeconds (string $obj_type)
 
static supportsMark (string $obj_type)
 
static supportsMatrixView (string $obj_type)
 
static getDefaultModes (bool $lp_active)
 Get available type-specific default modes (no administration needed) More...
 
static saveTypeDefaults (array $data)
 
static getTypeDefault (string $type)
 

Static Protected Member Functions

static isLPMember (array &$a_res, int $a_usr_id, array $a_obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
- Static Protected Member Functions inherited from ilObjectLP
static isLPMember (array &$res, int $usr_id, array $obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
static findMembershipsByPath (array &$res, int $usr_id, int $parent_ref_id, array $obj_ids, bool $mapped_ref_ids=false)
 Find (lp-relevant) memberships by path. More...
 
static getTypeDefaultFromDB (string $type)
 

Additional Inherited Members

- Protected Member Functions inherited from ilObjectLP
 __construct (int $obj_id)
 
 resetCustomLPDataForUserIds (array $user_ids, bool $recursive=true)
 
 gatherLPUsers ()
 
 updateParentCollections ()
 
- Protected Attributes inherited from ilObjectLP
ilTree $tree
 
ilDBInterface $db
 
ilObjectDefinition $objectDefinition
 
int $obj_id
 
ilLPCollection $collection_instance = null
 
int $mode = null
 
- Static Protected Attributes inherited from ilObjectLP
static array $type_defaults = null
 

Detailed Description

Definition at line 27 of file class.ilGroupLP.php.

Member Function Documentation

◆ getDefaultMode()

ilGroupLP::getDefaultMode ( )

Reimplemented from ilObjectLP.

Definition at line 43 of file class.ilGroupLP.php.

43 : int
44 {
46 }

References ilLPObjSettings\LP_MODE_DEACTIVATED.

◆ getDefaultModes()

static ilGroupLP::getDefaultModes ( bool  $lp_active)
static

Get available type-specific default modes (no administration needed)

Returns
int[]

Reimplemented from ilObjectLP.

Definition at line 29 of file class.ilGroupLP.php.

29 : array
30 {
31 if (!$a_lp_active) {
32 return array(
34 );
35 } else {
36 return array(
39 );
40 }
41 }

References ilLPObjSettings\LP_MODE_DEACTIVATED, and ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR.

◆ getMembers()

ilGroupLP::getMembers ( bool  $a_search = true)

Reimplemented from ilObjectLP.

Definition at line 57 of file class.ilGroupLP.php.

57 : array
58 {
59 $member_obj = ilGroupParticipants::_getInstanceByObjId($this->obj_id);
60 return $member_obj->getMembers();
61 }
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.

References ilGroupParticipants\_getInstanceByObjId().

+ Here is the call graph for this function:

◆ getValidModes()

ilGroupLP::getValidModes ( )

◆ isLPMember()

static ilGroupLP::isLPMember ( array &  $res,
int  $usr_id,
array  $obj_ids 
)
staticprotected

Find (lp-relevant) members for given object ids.

Reimplemented from ilObjectLP.

Definition at line 63 of file class.ilGroupLP.php.

63 : bool
64 {
65 global $DIC;
66
67 $ilDB = $DIC->database();
68
69 // will only find objects with roles for user!
70 // see ilParticipants::_getMembershipByType()
71 $query = " SELECT DISTINCT obd.obj_id, obd.type, obd2.title" .
72 " FROM rbac_ua ua" .
73 " JOIN rbac_fa fa ON (ua.rol_id = fa.rol_id)" .
74 " JOIN object_reference obr ON (fa.parent = obr.ref_id)" .
75 " JOIN object_data obd ON (obr.obj_id = obd.obj_id)" .
76 " JOIN object_data obd2 ON (ua.rol_id = obd2.obj_id)" .
77 " WHERE obd.type = " . $ilDB->quote("grp", "text") .
78 " AND fa.assign = " . $ilDB->quote("y", "text") .
79 " AND ua.usr_id = " . $ilDB->quote($a_usr_id, "integer") .
80 " AND " . $ilDB->in("obd.obj_id", $a_obj_ids, false, "integer");
81 $set = $ilDB->query($query);
82 while ($row = $ilDB->fetchAssoc($set)) {
83 $role = $row["title"];
84 if (!stristr($role, "il_" . $row["type"] . "_admin_") &&
85 !stristr($role, "il_" . $row["type"] . "_tutor_")) {
86 $a_res[$row["obj_id"]] = true;
87 }
88 }
89 return true;
90 }
global $DIC
Definition: shib_login.php:26

References $DIC, and $ilDB.


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