ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilParticipant Class Reference

Base class for course and group participant. More...

+ Inheritance diagram for ilParticipant:
+ Collaboration diagram for ilParticipant:

Public Member Functions

 getUserId ()
 get user id More...
 
 isBlocked ()
 
 isContact ()
 Check if user is contact for current object. More...
 
 isAssigned ()
 
 isMember ()
 
 isAdmin ()
 
 isTutor ()
 
 isParticipant ()
 
 getNumberOfMembers ()
 
 add ($a_usr_id, $a_role)
 Add user to course/group. More...
 
 delete ($a_usr_id)
 Drop user from all roles. More...
 
 deleteSubscriber ($a_usr_id)
 Delete subsciber. More...
 
 addDesktopItem ($a_usr_id)
 Add desktop item. More...
 
 dropDesktopItem ($a_usr_id)
 Drop desktop item. More...
 
 updateContact ($a_usr_id, $a_contact)
 ilDB $ilDB More...
 
 updateNotification ($a_usr_id, $a_notification)
 Update notification status. More...
 
 checkLastAdmin ($a_usr_ids)
 Check if user for deletion are last admins. More...
 

Static Public Member Functions

static updateMemberRoles ($a_obj_id, $a_usr_id, $a_role_id, $a_status)
 Update member roles ilDB $ilDB. More...
 
static getMembershipRoleType ($a_role_id)
 
static lookupStatusByMembershipRoleType ($a_obj_id, $a_usr_id, $a_membership_role_type)
 lookup assignment status ilDB $ilDB More...
 

Data Fields

const MEMBERSHIP_ADMIN = 1
 
const MEMBERSHIP_TUTOR = 2
 
const MEMBERSHIP_MEMBER = 3
 

Protected Member Functions

 __construct ($a_component_name, $a_obj_id, $a_usr_id)
 Singleton Constructor. More...
 
 getComponent ()
 Get component name Used for event handling. More...
 
 readParticipant ()
 Read participant. More...
 
 readParticipantStatus ()
 Read participant status ilDB $ilDB. More...
 

Protected Attributes

 $type = ''
 

Private Attributes

 $obj_id = 0
 
 $usr_id = 0
 
 $ref_id = 0
 
 $component = ''
 
 $participants = false
 
 $admins = false
 
 $tutors = false
 
 $members = false
 
 $numMembers = 0
 
 $participants_status = array()
 

Detailed Description

Base class for course and group participant.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 34 of file class.ilParticipant.php.

Constructor & Destructor Documentation

◆ __construct()

ilParticipant::__construct (   $a_component_name,
  $a_obj_id,
  $a_usr_id 
)
protected

Singleton Constructor.

protected

Parameters
intobj_id of container

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

References $ilDB, $lng, ilObject\_getAllReferences(), ilObject\_lookupType(), readParticipant(), and readParticipantStatus().

64  {
65  global $ilDB,$lng;
66 
67  $this->obj_id = $a_obj_id;
68  $this->usr_id = $a_usr_id;
69  $this->type = ilObject::_lookupType($a_obj_id);
70  $ref_ids = ilObject::_getAllReferences($this->obj_id);
71  $this->ref_id = current($ref_ids);
72 
73  $this->component = $a_component_name;
74 
75  $this->readParticipant();
76  $this->readParticipantStatus();
77  }
readParticipantStatus()
Read participant status ilDB $ilDB.
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
readParticipant()
Read participant.
global $lng
Definition: privfeed.php:40
global $ilDB
+ Here is the call graph for this function:

Member Function Documentation

◆ add()

ilParticipant::add (   $a_usr_id,
  $a_role 
)

Add user to course/group.

public

Parameters
intuser id
introle IL_CRS_ADMIN || IL_CRS_TUTOR || IL_CRS_MEMBER

global ilRbacReview $rbacreview

Definition at line 404 of file class.ilParticipant.php.

References $ilLog, addDesktopItem(), deleteSubscriber(), ilWaitingList\deleteUserEntry(), getComponent(), IL_CRS_ADMIN, IL_CRS_MEMBER, IL_CRS_TUTOR, IL_GRP_ADMIN, and IL_GRP_MEMBER.

405  {
406  global $rbacadmin,$ilLog,$ilAppEventHandler,$rbacreview;
407 
408 
409  if($rbacreview->isAssignedToAtLeastOneGivenRole($a_usr_id,$this->roles))
410  {
411  return false;
412  }
413 
414  switch($a_role)
415  {
416  case IL_CRS_ADMIN:
417  $this->admins = true;
418  break;
419 
420  case IL_CRS_TUTOR:
421  $this->tutors = true;
422  break;
423 
424  case IL_CRS_MEMBER:
425  $this->members = true;
426  break;
427 
428  case IL_GRP_ADMIN:
429  $this->admins = true;
430  break;
431 
432  case IL_GRP_MEMBER:
433  $this->members = true;
434  break;
435  }
436 
437  $rbacadmin->assignUser($this->role_data[$a_role],$a_usr_id);
438  $this->addDesktopItem($a_usr_id);
439 
440  // Delete subscription request
441  $this->deleteSubscriber($a_usr_id);
442 
443  include_once './Services/Membership/classes/class.ilWaitingList.php';
444  ilWaitingList::deleteUserEntry($a_usr_id,$this->obj_id);
445 
446  $ilLog->write(__METHOD__.': Raise new event: '.$this->getComponent().' addParticipant');
447  $ilAppEventHandler->raise(
448  $this->getComponent(),
449  "addParticipant",
450  array(
451  'obj_id' => $this->obj_id,
452  'usr_id' => $a_usr_id,
453  'role_id' => $a_role)
454  );
455  return true;
456  }
const IL_GRP_ADMIN
const IL_CRS_TUTOR
deleteSubscriber($a_usr_id)
Delete subsciber.
const IL_GRP_MEMBER
getComponent()
Get component name Used for event handling.
const IL_CRS_MEMBER
const IL_CRS_ADMIN
Base class for course and group participants.
addDesktopItem($a_usr_id)
Add desktop item.
static deleteUserEntry($a_usr_id, $a_obj_id)
Delete one user entry.
+ Here is the call graph for this function:

◆ addDesktopItem()

ilParticipant::addDesktopItem (   $a_usr_id)

Add desktop item.

public

Parameters
intusr_id

Definition at line 514 of file class.ilParticipant.php.

References ilObjUser\_addDesktopItem(), and ilObjUser\_isDesktopItem().

Referenced by add().

515  {
516  if(!ilObjUser::_isDesktopItem($a_usr_id, $this->ref_id,$this->type))
517  {
518  ilObjUser::_addDesktopItem($a_usr_id, $this->ref_id,$this->type);
519  }
520  return true;
521  }
static _addDesktopItem($a_usr_id, $a_item_id, $a_type, $a_par="")
add an item to user's personal desktop
static _isDesktopItem($a_usr_id, $a_item_id, $a_type)
check wether an item is on the users desktop or not
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkLastAdmin()

ilParticipant::checkLastAdmin (   $a_usr_ids)

Check if user for deletion are last admins.

public

Parameters
arrayarray of user ids for deletion

Definition at line 611 of file class.ilParticipant.php.

References $data, $ilDB, $query, $res, IL_CRS_ADMIN, and IL_GRP_ADMIN.

612  {
613  global $ilDB;
614 
615  $admin_role_id =
616  $this->type == 'crs' ?
617  $this->role_data[IL_CRS_ADMIN] :
618  $this->role_data[IL_GRP_ADMIN];
619 
620 
621  $query = "
622  SELECT COUNT(rolesusers.usr_id) cnt
623 
624  FROM object_data rdata
625 
626  LEFT JOIN rbac_ua rolesusers
627  ON rolesusers.rol_id = rdata.obj_id
628 
629  WHERE rdata.obj_id = %s
630  ";
631 
632  $query .= ' AND '.$ilDB->in('rolesusers.usr_id', $a_usr_ids, true, 'integer');
633  $res = $ilDB->queryF($query, array('integer'), array($admin_role_id));
634 
635  $data = $ilDB->fetchAssoc($res);
636 
637  return (int)$data['cnt'] > 0;
638  }
const IL_GRP_ADMIN
$data
const IL_CRS_ADMIN
Base class for course and group participants.
global $ilDB

◆ delete()

ilParticipant::delete (   $a_usr_id)

Drop user from all roles.

public

Parameters
intusr_id

Definition at line 465 of file class.ilParticipant.php.

References $ilDB, $query, $res, dropDesktopItem(), and getComponent().

466  {
467  global $rbacadmin,$ilDB, $ilAppEventHandler;
468 
469  $this->dropDesktopItem($a_usr_id);
470  foreach($this->roles as $role_id)
471  {
472  $rbacadmin->deassignUser($role_id,$a_usr_id);
473  }
474 
475  $query = "DELETE FROM obj_members ".
476  "WHERE usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ".
477  "AND obj_id = ".$ilDB->quote($this->obj_id ,'integer');
478  $res = $ilDB->manipulate($query);
479 
480  $ilAppEventHandler->raise(
481  $this->getComponent(),
482  "deleteParticipant",
483  array(
484  'obj_id' => $this->obj_id,
485  'usr_id' => $a_usr_id)
486  );
487  return true;
488  }
getComponent()
Get component name Used for event handling.
dropDesktopItem($a_usr_id)
Drop desktop item.
global $ilDB
+ Here is the call graph for this function:

◆ deleteSubscriber()

ilParticipant::deleteSubscriber (   $a_usr_id)

Delete subsciber.

public

Definition at line 495 of file class.ilParticipant.php.

References $ilDB, $query, and $res.

Referenced by add().

496  {
497  global $ilDB;
498 
499  $query = "DELETE FROM il_subscribers ".
500  "WHERE usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ".
501  "AND obj_id = ".$ilDB->quote($this->obj_id ,'integer')." ";
502  $res = $ilDB->manipulate($query);
503 
504  return true;
505  }
global $ilDB
+ Here is the caller graph for this function:

◆ dropDesktopItem()

ilParticipant::dropDesktopItem (   $a_usr_id)

Drop desktop item.

public

Parameters
intusr_id

Definition at line 530 of file class.ilParticipant.php.

References ilObjUser\_dropDesktopItem(), and ilObjUser\_isDesktopItem().

Referenced by delete().

531  {
532  if(ilObjUser::_isDesktopItem($a_usr_id, $this->ref_id,$this->type))
533  {
534  ilObjUser::_dropDesktopItem($a_usr_id, $this->ref_id,$this->type);
535  }
536 
537  return true;
538  }
static _dropDesktopItem($a_usr_id, $a_item_id, $a_type)
drop an item from user's personal desktop
static _isDesktopItem($a_usr_id, $a_item_id, $a_type)
check wether an item is on the users desktop or not
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getComponent()

ilParticipant::getComponent ( )
protected

Get component name Used for event handling.

Returns
type

Definition at line 226 of file class.ilParticipant.php.

References $component.

Referenced by add(), and delete().

227  {
228  return $this->component;
229  }
+ Here is the caller graph for this function:

◆ getMembershipRoleType()

static ilParticipant::getMembershipRoleType (   $a_role_id)
static
Parameters
type$a_role_id

Definition at line 168 of file class.ilParticipant.php.

References ilObject\_lookupTitle().

169  {
170  $title = ilObject::_lookupTitle($a_role_id);
171  switch(substr($title, 0, 8))
172  {
173  case 'il_crs_a':
174  case 'il_grp_a':
175  return self::MEMBERSHIP_ADMIN;
176 
177  case 'il_crs_t':
178  return self::MEMBERSHIP_TUTOR;
179 
180  case 'il_crs_m':
181  default:
182  return self::MEMBERSHIP_MEMBER;
183 
184  }
185  }
static _lookupTitle($a_id)
lookup object title
+ Here is the call graph for this function:

◆ getNumberOfMembers()

ilParticipant::getNumberOfMembers ( )

Definition at line 281 of file class.ilParticipant.php.

References $numMembers.

282  {
283  return $this->numMembers;
284  }

◆ getUserId()

ilParticipant::getUserId ( )

get user id

Returns
int

Definition at line 235 of file class.ilParticipant.php.

References $usr_id.

Referenced by isBlocked(), isContact(), and readParticipantStatus().

236  {
237  return $this->usr_id;
238  }
+ Here is the caller graph for this function:

◆ isAdmin()

ilParticipant::isAdmin ( )

Definition at line 266 of file class.ilParticipant.php.

References $admins.

267  {
268  return $this->admins;
269  }

◆ isAssigned()

ilParticipant::isAssigned ( )

Definition at line 256 of file class.ilParticipant.php.

References $participants.

257  {
258  return (bool) $this->participants;
259  }

◆ isBlocked()

ilParticipant::isBlocked ( )

Definition at line 240 of file class.ilParticipant.php.

References getUserId().

241  {
242  return (bool) $this->participants_status[$this->getUserId()]['blocked'];
243  }
getUserId()
get user id
+ Here is the call graph for this function:

◆ isContact()

ilParticipant::isContact ( )

Check if user is contact for current object.

Returns
bool

Definition at line 250 of file class.ilParticipant.php.

References getUserId().

251  {
252  return (bool) $this->participants_status[$this->getUserId()]['contact'];
253  }
getUserId()
get user id
+ Here is the call graph for this function:

◆ isMember()

ilParticipant::isMember ( )

Definition at line 261 of file class.ilParticipant.php.

References $members.

262  {
263  return (bool) $this->members;
264  }

◆ isParticipant()

ilParticipant::isParticipant ( )

Definition at line 276 of file class.ilParticipant.php.

References $participants.

277  {
278  return (bool) $this->participants;
279  }

◆ isTutor()

ilParticipant::isTutor ( )

Definition at line 271 of file class.ilParticipant.php.

References $tutors.

272  {
273  return (bool) $this->tutors;
274  }

◆ lookupStatusByMembershipRoleType()

static ilParticipant::lookupStatusByMembershipRoleType (   $a_obj_id,
  $a_usr_id,
  $a_membership_role_type 
)
static

lookup assignment status ilDB $ilDB

Parameters
type$a_obj_id
type$a_usr_id
type$a_membership_role_type
Returns
int

Definition at line 195 of file class.ilParticipant.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

196  {
197  global $ilDB;
198 
199  $query = 'SELECT * FROM obj_members '.
200  'WHERE obj_id = '.$ilDB->quote($a_obj_id,'integer').' '.
201  'AND usr_id = '.$ilDB->quote($a_usr_id).' ';
202  $res = $ilDB->query($query);
203  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
204  {
205  switch($a_membership_role_type)
206  {
207  case self::MEMBERSHIP_ADMIN:
208  return $row->admin;
209 
210  case self::MEMBERSHIP_TUTOR:
211  return $row->tutor;
212 
213  case self::MEMBERSHIP_MEMBER:
214  return $row->member;
215  }
216  }
217  return 0;
218  }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB

◆ readParticipant()

ilParticipant::readParticipant ( )
protected

Read participant.

Returns
void

Definition at line 291 of file class.ilParticipant.php.

References $ilLog, IL_CRS_ADMIN, IL_CRS_MEMBER, IL_CRS_TUTOR, IL_GRP_ADMIN, and IL_GRP_MEMBER.

Referenced by __construct().

292  {
293  global $rbacreview,$ilObjDataCache,$ilLog;
294 
295  $this->roles = $rbacreview->getRolesOfRoleFolder($this->ref_id,false);
296 
297  $users = array();
298  $this->participants = array();
299  $this->members = $this->admins = $this->tutors = array();
300 
301  $member_roles = array();
302 
303  foreach($this->roles as $role_id)
304  {
305  $title = $ilObjDataCache->lookupTitle($role_id);
306  switch(substr($title,0,8))
307  {
308  case 'il_crs_m':
309  $member_roles[] = $role_id;
310  $this->role_data[IL_CRS_MEMBER] = $role_id;
311  if($rbacreview->isAssigned($this->getUserId(),$role_id))
312  {
313  $this->participants = true;
314  $this->members = true;
315  }
316  break;
317 
318  case 'il_crs_a':
319  $this->role_data[IL_CRS_ADMIN] = $role_id;
320  if($rbacreview->isAssigned($this->getUserId(),$role_id))
321  {
322  $this->participants = true;
323  $this->admins = true;
324  }
325  break;
326 
327  case 'il_crs_t':
328  $this->role_data[IL_CRS_TUTOR] = $role_id;
329  if($rbacreview->isAssigned($this->getUserId(),$role_id))
330  {
331  $this->participants = true;
332  $this->tutors = true;
333  }
334  break;
335 
336  case 'il_grp_a':
337  $this->role_data[IL_GRP_ADMIN] = $role_id;
338  if($rbacreview->isAssigned($this->getUserId(),$role_id))
339  {
340  $this->participants = true;
341  $this->admins = true;
342  }
343  break;
344 
345  case 'il_grp_m':
346  $member_roles[] = $role_id;
347  $this->role_data[IL_GRP_MEMBER] = $role_id;
348  if($rbacreview->isAssigned($this->getUserId(),$role_id))
349  {
350  $this->participants = true;
351  $this->members = true;
352  }
353  break;
354 
355  default:
356 
357  $member_roles[] = $role_id;
358  if($rbacreview->isAssigned($this->getUserId(),$role_id))
359  {
360  $this->participants = true;
361  $this->members = true;
362  }
363  break;
364  }
365  }
366  $this->numMembers = $rbacreview->getNumberOfAssignedUsers((array) $member_roles);
367  }
const IL_GRP_ADMIN
const IL_CRS_TUTOR
const IL_GRP_MEMBER
const IL_CRS_MEMBER
const IL_CRS_ADMIN
Base class for course and group participants.
+ Here is the caller graph for this function:

◆ readParticipantStatus()

ilParticipant::readParticipantStatus ( )
protected

Read participant status ilDB $ilDB.

Definition at line 373 of file class.ilParticipant.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and getUserId().

Referenced by __construct().

374  {
375  global $ilDB;
376 
377  $query = "SELECT * FROM obj_members ".
378  "WHERE obj_id = ".$ilDB->quote($this->obj_id ,'integer')." ".
379  'AND usr_id = '.$ilDB->quote($this->getUserId(),'integer');
380 
381  $res = $ilDB->query($query);
382  $this->participants_status = array();
383  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
384  {
385  $this->participants_status[$this->getUserId()]['blocked'] = $row->blocked;
386  $this->participants_status[$this->getUserId()]['notification'] = $row->notification;
387  $this->participants_status[$this->getUserId()]['passed'] = $row->passed;
388  // cognos-blu-patch: begin
389  $this->participants_status[$this->getUserId()]['contact'] = $row->contact;
390  // cognos-blu-patch: end
391  }
392  }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB
getUserId()
get user id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateContact()

ilParticipant::updateContact (   $a_usr_id,
  $a_contact 
)

ilDB $ilDB

Parameters
type$a_usr_id
type$a_contact
Returns
boolean

Definition at line 548 of file class.ilParticipant.php.

References $ilDB.

549  {
550  global $ilDB;
551 
552  $ilDB->manipulate(
553  'UPDATE obj_members SET '.
554  'contact = '.$ilDB->quote($a_contact,'integer').' '.
555  'WHERE obj_id = '.$ilDB->quote($this->obj_id,'integer').' '.
556  'AND usr_id = '.$ilDB->quote($a_usr_id,'integer'));
557 
558  $this->participants_status[$a_usr_id]['contact'] = $a_contact;
559  return TRUE;
560  }
global $ilDB

◆ updateMemberRoles()

static ilParticipant::updateMemberRoles (   $a_obj_id,
  $a_usr_id,
  $a_role_id,
  $a_status 
)
static

Update member roles ilDB $ilDB.

Parameters
type$a_obj_id
type$a_role_id
type$a_status

Definition at line 86 of file class.ilParticipant.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and ilLoggerFactory\getInstance().

Referenced by ilGroupAppEventListener\handleUserAssignments(), and ilCourseAppEventListener\handleUserAssignments().

87  {
88  global $ilDB;
89 
90  $a_membership_role_type = self::getMembershipRoleType($a_role_id);
91 
92  ilLoggerFactory::getInstance()->getLogger('crs')->debug($a_membership_role_type);
93 
94  switch($a_membership_role_type)
95  {
96  case self::MEMBERSHIP_ADMIN:
97  $update_fields = array('admin' => array('integer', $a_status ? 1 : 0));
98  $update_string = ('admin = '.$ilDB->quote($a_status ? 1 : 0, 'integer'));
99  break;
100 
101  case self::MEMBERSHIP_TUTOR:
102  $update_fields = array('tutor' => array('integer', $a_status ? 1 : 0));
103  $update_string = ('tutor = '.$ilDB->quote($a_status ? 1 : 0, 'integer'));
104  break;
105 
106  case self::MEMBERSHIP_MEMBER:
107  default:
108  $current_status = self::lookupStatusByMembershipRoleType($a_obj_id, $a_usr_id, $a_membership_role_type);
109  ilLoggerFactory::getInstance()->getLogger('crs')->debug($current_status);
110 
111  if($a_status)
112  {
113  $new_status = $current_status + 1;
114  }
115  if(!$a_status)
116  {
117  $new_status = $current_status - 1;
118  if($new_status < 0)
119  {
120  $new_status = 0;
121  }
122  }
123 
124  $update_fields = array('member' => array('integer', $new_status));
125  $update_string = ('member = '.$ilDB->quote($new_status, 'integer'));
126  break;
127  }
128 
129  $query = 'SELECT count(*) num FROM obj_members '.
130  'WHERE obj_id = '.$ilDB->quote($a_obj_id,'integer').' '.
131  'AND usr_id = '.$ilDB->quote($a_usr_id,'integer');
132  $res = $ilDB->query($query);
133 
134  $found = FALSE;
135  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
136  {
137  if($row->num)
138  {
139  $found = TRUE;
140  }
141  }
142  if(!$found)
143  {
144  $ilDB->replace(
145  'obj_members',
146  array(
147  'obj_id' => array('integer',$a_obj_id),
148  'usr_id' => array('integer',$a_usr_id)
149  ),
150  $update_fields
151  );
152  }
153  else
154  {
155  $query = 'UPDATE obj_members SET '.
156  $update_string.' '.
157  'WHERE obj_id = '.$ilDB->quote($a_obj_id,'integer').' '.
158  'AND usr_id = '.$ilDB->quote($a_usr_id,'integer');
159 
160  $ilDB->manipulate($query);
161  }
162  }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateNotification()

ilParticipant::updateNotification (   $a_usr_id,
  $a_notification 
)

Update notification status.

public

Parameters
intusr_id
boolpassed

Definition at line 571 of file class.ilParticipant.php.

References $ilDB, $query, and $res.

572  {
573  global $ilDB;
574 
575  $this->participants_status[$a_usr_id]['notification'] = (int) $a_notification;
576 
577  $query = "SELECT * FROM obj_members ".
578  "WHERE obj_id = ".$ilDB->quote($this->obj_id ,'integer')." ".
579  "AND usr_id = ".$ilDB->quote($a_usr_id ,'integer');
580  $res = $ilDB->query($query);
581  if($res->numRows())
582  {
583  $query = "UPDATE obj_members SET ".
584  "notification = ".$ilDB->quote((int) $a_notification ,'integer')." ".
585  "WHERE obj_id = ".$ilDB->quote($this->obj_id ,'integer')." ".
586  "AND usr_id = ".$ilDB->quote($a_usr_id ,'integer');
587  }
588  else
589  {
590  $query = "INSERT INTO obj_members (notification,obj_id,usr_id,passed,blocked) ".
591  "VALUES ( ".
592  $ilDB->quote((int) $a_notification ,'integer').", ".
593  $ilDB->quote($this->obj_id ,'integer').", ".
594  $ilDB->quote($a_usr_id ,'integer').", ".
595  $ilDB->quote(0,'integer').", ".
596  $ilDB->quote(0,'integer').
597  ")";
598 
599  }
600  $res = $ilDB->manipulate($query);
601  return true;
602  }
global $ilDB

Field Documentation

◆ $admins

ilParticipant::$admins = false
private

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

Referenced by isAdmin().

◆ $component

ilParticipant::$component = ''
private

Definition at line 46 of file class.ilParticipant.php.

Referenced by getComponent().

◆ $members

ilParticipant::$members = false
private

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

Referenced by isMember().

◆ $numMembers

ilParticipant::$numMembers = 0
private

Definition at line 53 of file class.ilParticipant.php.

Referenced by getNumberOfMembers().

◆ $obj_id

ilParticipant::$obj_id = 0
private

Definition at line 41 of file class.ilParticipant.php.

◆ $participants

ilParticipant::$participants = false
private

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

Referenced by isAssigned(), and isParticipant().

◆ $participants_status

ilParticipant::$participants_status = array()
private

Definition at line 55 of file class.ilParticipant.php.

◆ $ref_id

ilParticipant::$ref_id = 0
private

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

◆ $tutors

ilParticipant::$tutors = false
private

Definition at line 50 of file class.ilParticipant.php.

Referenced by isTutor().

◆ $type

ilParticipant::$type = ''
protected

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

◆ $usr_id

ilParticipant::$usr_id = 0
private

Definition at line 42 of file class.ilParticipant.php.

Referenced by getUserId().

◆ MEMBERSHIP_ADMIN

const ilParticipant::MEMBERSHIP_ADMIN = 1

Definition at line 36 of file class.ilParticipant.php.

◆ MEMBERSHIP_MEMBER

const ilParticipant::MEMBERSHIP_MEMBER = 3

Definition at line 38 of file class.ilParticipant.php.

◆ MEMBERSHIP_TUTOR

const ilParticipant::MEMBERSHIP_TUTOR = 2

Definition at line 37 of file class.ilParticipant.php.


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