ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilModulesGroupTasks Class Reference

Class ilModulesGroupTasks. More...

+ Collaboration diagram for ilModulesGroupTasks:

Static Public Member Functions

static readMembersFromGroup ($context, $params)
 
static readAdminsFromGroup ($context, $params)
 
static assignMembersToGroup ($context, $params)
 
static assignAdminsToGroup ($context, $params)
 

Detailed Description

Class ilModulesGroupTasks.

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 11 of file class.ilModulesGroupTasks.php.

Member Function Documentation

◆ assignAdminsToGroup()

static ilModulesGroupTasks::assignAdminsToGroup (   $context,
  $params 
)
static
Parameters
ilNode$context
array$params

Definition at line 108 of file class.ilModulesGroupTasks.php.

References $params, ilGroupParticipants\_getInstanceByObjId(), ilObject\_lookupObjectId(), and IL_GRP_ADMIN.

109  {
110  /*
111  * Modelling:
112 
113  <bpmn2:extensionElements>
114  <ilias:properties>
115  <ilias:libraryCall location="Services/WorkflowEngine/classes/tasks/class.ilModulesGroupTasks.php" api="ilModulesGroupTasks" method="assignAdminsToGroup" />
116  </ilias:properties>
117  </bpmn2:extensionElements>
118 
119  */
120 
121  require_once './Modules/Group/classes/class.ilGroupParticipants.php';
122  $input_params = $params[0];
123  $output_params = $params[1];
124 
125  $participants = ilGroupParticipants::_getInstanceByObjId(ilObject::_lookupObjectId($input_params['grpRefId']));
126  foreach($input_params['usrIdList'] as $user_id)
127  {
128  $participants->add($user_id, IL_GRP_ADMIN);
129  }
130  return;
131  }
const IL_GRP_ADMIN
static _lookupObjectId($a_ref_id)
lookup object id
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
$params
Definition: example_049.php:96
+ Here is the call graph for this function:

◆ assignMembersToGroup()

static ilModulesGroupTasks::assignMembersToGroup (   $context,
  $params 
)
static
Parameters
ilNode$context
array$params
Returns
array

Definition at line 78 of file class.ilModulesGroupTasks.php.

References $params, ilGroupParticipants\_getInstanceByObjId(), ilObject\_lookupObjectId(), and IL_GRP_MEMBER.

79  {
80  /*
81  * Modelling:
82 
83  <bpmn2:extensionElements>
84  <ilias:properties>
85  <ilias:libraryCall location="Services/WorkflowEngine/classes/tasks/class.ilModulesGroupTasks.php" api="ilModulesGroupTasks" method="assignMembersToGroup" />
86  </ilias:properties>
87  </bpmn2:extensionElements>
88 
89  */
90 
91  require_once './Modules/Group/classes/class.ilGroupParticipants.php';
92  $input_params = $params[0];
93  $output_params = $params[1];
94 
95  $members = ilGroupParticipants::_getInstanceByObjId(ilObject::_lookupObjectId($input_params['grpRefId']));
96  foreach($input_params['usrIdList'] as $user_id)
97  {
98  $members->add($user_id, IL_GRP_MEMBER);
99  }
100 
101  return;
102  }
const IL_GRP_MEMBER
static _lookupObjectId($a_ref_id)
lookup object id
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
$params
Definition: example_049.php:96
+ Here is the call graph for this function:

◆ readAdminsFromGroup()

static ilModulesGroupTasks::readAdminsFromGroup (   $context,
  $params 
)
static
Parameters
ilNode$context
array$params
Returns
array

Definition at line 48 of file class.ilModulesGroupTasks.php.

References $params, ilGroupParticipants\_getInstanceByObjId(), ilObject\_lookupObjectId(), and array.

49  {
50  /*
51  * Modelling:
52 
53  <bpmn2:extensionElements>
54  <ilias:properties>
55  <ilias:libraryCall location="Services/WorkflowEngine/classes/tasks/class.ilModulesGroupTasks.php" api="ilModulesGroupTasks" method="readAdminsFromGroup" />
56  </ilias:properties>
57  </bpmn2:extensionElements>
58 
59  */
60 
61  require_once './Modules/Group/classes/class.ilGroupParticipants.php';
62  $input_params = $params[0];
63  $output_params = $params[1];
64 
65  $participants = ilGroupParticipants::_getInstanceByObjId(ilObject::_lookupObjectId($input_params['grpRefId']));
66  $admins = $participants->getAdmins();
67  $retval = array($output_params[0] => $admins);
68 
69  return $retval;
70  }
static _lookupObjectId($a_ref_id)
lookup object id
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
Create styles array
The data for the language used.
$params
Definition: example_049.php:96
+ Here is the call graph for this function:

◆ readMembersFromGroup()

static ilModulesGroupTasks::readMembersFromGroup (   $context,
  $params 
)
static
Parameters
ilNode$context
array$params
Returns
array

Definition at line 19 of file class.ilModulesGroupTasks.php.

References $params, ilGroupParticipants\_getInstanceByObjId(), ilObject\_lookupObjectId(), and array.

20  {
21  /*
22  * Modelling:
23 
24  <bpmn2:extensionElements>
25  <ilias:properties>
26  <ilias:libraryCall location="Services/WorkflowEngine/classes/tasks/class.ilModulesGroupTasks.php" api="ilModulesGroupTasks" method="readMembersFromGroup" />
27  </ilias:properties>
28  </bpmn2:extensionElements>
29 
30  */
31  require_once './Modules/Group/classes/class.ilGroupParticipants.php';
32  $input_params = $params[0];
33  $output_params = $params[1];
34 
35  $participants = ilGroupParticipants::_getInstanceByObjId(ilObject::_lookupObjectId($input_params['grpRefId']));
36  $members = $participants->getMembers();
37  $retval = array($output_params[0] => $members);
38 
39  return $retval;
40  }
static _lookupObjectId($a_ref_id)
lookup object id
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
Create styles array
The data for the language used.
$params
Definition: example_049.php:96
+ Here is the call graph for this function:

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