ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 (ilRadioGroupInputGUI $modeRadio)
 
 shouldFetchIndividualModeFromFormSubmission ()
 
 fetchIndividualModeFromFormSubmission (ilPropertyFormGUI $form)
 
 appendModeConfiguration (int $mode, ilRadioOption $modeElement)
 
 saveModeConfiguration (ilPropertyFormGUI $form, bool &$modeChanged)
 

Static Public Member Functions

static getDefaultModes (bool $a_lp_active)
 
- 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)
 
- 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 13 of file class.ilGroupLP.php.

Member Function Documentation

◆ getDefaultMode()

ilGroupLP::getDefaultMode ( )

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

References ilLPObjSettings\LP_MODE_DEACTIVATED.

29  : int
30  {
32  }

◆ getDefaultModes()

static ilGroupLP::getDefaultModes ( bool  $a_lp_active)
static

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

References ilLPObjSettings\LP_MODE_DEACTIVATED, and ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR.

15  : array
16  {
17  if (!$a_lp_active) {
18  return array(
20  );
21  } else {
22  return array(
25  );
26  }
27  }

◆ getMembers()

ilGroupLP::getMembers ( bool  $a_search = true)

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

References ilGroupParticipants\_getInstanceByObjId().

43  : array
44  {
45  $member_obj = ilGroupParticipants::_getInstanceByObjId($this->obj_id);
46  return $member_obj->getMembers();
47  }
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.
+ Here is the call graph for this function:

◆ getValidModes()

◆ isLPMember()

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

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

References $DIC, $ilDB, and $query.

49  : bool
50  {
51  global $DIC;
52 
53  $ilDB = $DIC->database();
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, false, "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  return true;
76  }
global $DIC
Definition: feed.php:28
$query

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