ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilGroupLP Class Reference
+ Inheritance diagram for ilGroupLP:
+ Collaboration diagram for ilGroupLP:

Public Member Functions

 getDefaultMode ()
 
 getValidModes ()
 
 getMembers ($a_search=true)
 
- Public Member Functions inherited from ilObjectLP
 resetCaches ()
 
 isAnonymized ()
 
 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
 isActive ()
 
 getModeText ($a_mode)
 
 getModeInfoText ($a_mode)
 
 getSettingsInfo ()
 
 getCollectionInstance ()
 
 getMembers ($a_search=true)
 
 resetLPDataForCompleteObject ($a_recursive=true)
 
 resetLPDataForUserIds (array $a_user_ids, $a_recursive=true)
 
 handleToTrash ()
 
 handleDelete ()
 
 getMailTemplateId ()
 

Static Public Member Functions

static getDefaultModes ($a_lp_active)
 Get available type-specific default modes (no administration needed) More...
 
- Static Public Member Functions inherited from ilObjectLP
static getInstance ($a_obj_id)
 
static getTypeClass ($a_type)
 
static isSupportedObjectType ($a_type)
 
static handleMove ($a_source_ref_id)
 
static getLPMemberships ($a_usr_id, array $a_obj_ids, $a_parent_ref_id=null, $a_mapped_ref_ids=false)
 Get all objects where given user is member (from LP POV) More...
 
static supportsSpentSeconds ($a_obj_type)
 
static supportsMark ($a_obj_type)
 
static supportsMatrixView ($a_obj_type)
 
static getDefaultModes ($a_lp_active)
 Get available type-specific default modes (no administration needed) More...
 
static saveTypeDefaults (array $a_data)
 
static getTypeDefault ($a_type)
 Get current type default. More...
 

Static Protected Member Functions

static isLPMember (array &$a_res, $a_usr_id, $a_obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
- Static Protected Member Functions inherited from ilObjectLP
static isLPMember (array &$a_res, $a_usr_id, $a_obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
static findMembershipsByPath (array &$a_res, $a_usr_id, $a_parent_ref_id, array $a_obj_ids, $a_mapped_ref_ids=false)
 Find (lp-relevant) memberships by path. More...
 
static getTypeDefaultFromDB ($a_type)
 

Additional Inherited Members

- Protected Member Functions inherited from ilObjectLP
 __construct ($a_obj_id)
 
 resetCustomLPDataForUserIds (array $a_user_ids, $a_recursive=true)
 
 gatherLPUsers ()
 
 updateParentCollections ()
 
- Protected Attributes inherited from ilObjectLP
 $tree
 
 $db
 
 $obj_id
 
 $collection_instance
 
 $mode
 
- Static Protected Attributes inherited from ilObjectLP
static $type_defaults
 

Detailed Description

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

Member Function Documentation

◆ getDefaultMode()

ilGroupLP::getDefaultMode ( )

Reimplemented from ilObjectLP.

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

References ilLPObjSettings\LP_MODE_DEACTIVATED.

◆ getDefaultModes()

static ilGroupLP::getDefaultModes (   $a_lp_active)
static

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

Parameters
bool$a_lp_active
Returns
array

Reimplemented from ilObjectLP.

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

17 {
18 if (!$a_lp_active) {
19 return array(
21 );
22 } else {
23 return array(
26 );
27 }
28 }

References ilLPObjSettings\LP_MODE_DEACTIVATED, and ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR.

◆ getMembers()

ilGroupLP::getMembers (   $a_search = true)

Reimplemented from ilObjectLP.

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

45 {
46 include_once 'Modules/Group/classes/class.ilGroupParticipants.php';
47 $member_obj = ilGroupParticipants::_getInstanceByObjId($this->obj_id);
48 return $member_obj->getMembers();
49 }
static _getInstanceByObjId($a_obj_id)
Get singleton instance.

References ilGroupParticipants\_getInstanceByObjId().

+ Here is the call graph for this function:

◆ getValidModes()

◆ isLPMember()

static ilGroupLP::isLPMember ( array &  $a_res,
  $a_usr_id,
  $a_obj_ids 
)
staticprotected

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

Parameters
array$a_res
int$a_usr_id
array$a_obj_ids

Reimplemented from ilObjectLP.

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

52 {
53 global $ilDB;
54
55 // will only find objects with roles for user!
56 // see ilParticipants::_getMembershipByType()
57 $query = " SELECT DISTINCT obd.obj_id, obd.type, obd2.title" .
58 " FROM rbac_ua ua" .
59 " JOIN rbac_fa fa ON (ua.rol_id = fa.rol_id)" .
60 " JOIN object_reference obr ON (fa.parent = obr.ref_id)" .
61 " JOIN object_data obd ON (obr.obj_id = obd.obj_id)" .
62 " JOIN object_data obd2 ON (ua.rol_id = obd2.obj_id)" .
63 " WHERE obd.type = " . $ilDB->quote("grp", "text") .
64 " AND fa.assign = " . $ilDB->quote("y", "text") .
65 " AND ua.usr_id = " . $ilDB->quote($a_usr_id, "integer") .
66 " AND " . $ilDB->in("obd.obj_id", $a_obj_ids, "", "integer");
67 $set = $ilDB->query($query);
68 while ($row = $ilDB->fetchAssoc($set)) {
69 $role = $row["title"];
70 if (!stristr($role, "il_" . $row["type"] . "_admin_") &&
71 !stristr($role, "il_" . $row["type"] . "_tutor_")) {
72 $a_res[$row["obj_id"]] = true;
73 }
74 }
75
76 return true;
77 }
$query
global $ilDB

References $ilDB, $query, and $row.


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