ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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)
 @global 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 @global ilDB $ilDB. More...
 
static getMembershipRoleType ($a_role_id)
 
static lookupStatusByMembershipRoleType ($a_obj_id, $a_usr_id, $a_membership_role_type)
 lookup assignment status @global 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 @global 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.

@access protected

Parameters
intobj_id of container

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

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 }
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
readParticipantStatus()
Read participant status @global ilDB $ilDB.
readParticipant()
Read participant.
global $lng
Definition: privfeed.php:17
global $ilDB

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

+ Here is the call graph for this function:

Member Function Documentation

◆ add()

ilParticipant::add (   $a_usr_id,
  $a_role 
)

Add user to course/group.

@access public

Parameters
intuser id
introle IL_CRS_ADMIN || IL_CRS_TUTOR || IL_CRS_MEMBER

global ilRbacReview $rbacreview

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

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

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

+ Here is the call graph for this function:

◆ addDesktopItem()

ilParticipant::addDesktopItem (   $a_usr_id)

Add desktop item.

@access public

Parameters
intusr_id

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

527 {
528 if(!ilObjUser::_isDesktopItem($a_usr_id, $this->ref_id,$this->type))
529 {
530 ilObjUser::_addDesktopItem($a_usr_id, $this->ref_id,$this->type);
531 }
532 return true;
533 }
static _isDesktopItem($a_usr_id, $a_item_id, $a_type)
check wether an item is on the users desktop or not
static _addDesktopItem($a_usr_id, $a_item_id, $a_type, $a_par="")
add an item to user's personal desktop

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

Referenced by add().

+ 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.

@access public

Parameters
arrayarray of user ids for deletion

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

624 {
625 global $ilDB;
626
627 $admin_role_id =
628 $this->type == 'crs' ?
629 $this->role_data[IL_CRS_ADMIN] :
630 $this->role_data[IL_GRP_ADMIN];
631
632
633 $query = "
634 SELECT COUNT(rolesusers.usr_id) cnt
635
636 FROM object_data rdata
637
638 LEFT JOIN rbac_ua rolesusers
639 ON rolesusers.rol_id = rdata.obj_id
640
641 WHERE rdata.obj_id = %s
642 ";
643
644 $query .= ' AND '.$ilDB->in('rolesusers.usr_id', $a_usr_ids, true, 'integer');
645 $res = $ilDB->queryF($query, array('integer'), array($admin_role_id));
646
647 $data = $ilDB->fetchAssoc($res);
648
649 return (int)$data['cnt'] > 0;
650 }

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

◆ delete()

ilParticipant::delete (   $a_usr_id)

Drop user from all roles.

@access public

Parameters
intusr_id

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

478 {
479 global $rbacadmin,$ilDB, $ilAppEventHandler;
480
481 $this->dropDesktopItem($a_usr_id);
482 foreach($this->roles as $role_id)
483 {
484 $rbacadmin->deassignUser($role_id,$a_usr_id);
485 }
486
487 $query = "DELETE FROM obj_members ".
488 "WHERE usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ".
489 "AND obj_id = ".$ilDB->quote($this->obj_id ,'integer');
490 $res = $ilDB->manipulate($query);
491
492 $ilAppEventHandler->raise(
493 $this->getComponent(),
494 "deleteParticipant",
495 array(
496 'obj_id' => $this->obj_id,
497 'usr_id' => $a_usr_id)
498 );
499 return true;
500 }
dropDesktopItem($a_usr_id)
Drop desktop item.

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

+ Here is the call graph for this function:

◆ deleteSubscriber()

ilParticipant::deleteSubscriber (   $a_usr_id)

Delete subsciber.

@access public

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

508 {
509 global $ilDB;
510
511 $query = "DELETE FROM il_subscribers ".
512 "WHERE usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ".
513 "AND obj_id = ".$ilDB->quote($this->obj_id ,'integer')." ";
514 $res = $ilDB->manipulate($query);
515
516 return true;
517 }

References $ilDB, $query, and $res.

Referenced by add().

+ Here is the caller graph for this function:

◆ dropDesktopItem()

ilParticipant::dropDesktopItem (   $a_usr_id)

Drop desktop item.

@access public

Parameters
intusr_id

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

543 {
544 if(ilObjUser::_isDesktopItem($a_usr_id, $this->ref_id,$this->type))
545 {
546 ilObjUser::_dropDesktopItem($a_usr_id, $this->ref_id,$this->type);
547 }
548
549 return true;
550 }
static _dropDesktopItem($a_usr_id, $a_item_id, $a_type)
drop an item from user's personal desktop

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

Referenced by delete().

+ 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 238 of file class.ilParticipant.php.

239 {
240 return $this->component;
241 }

References $component.

Referenced by add(), and delete().

+ Here is the caller graph for this function:

◆ getMembershipRoleType()

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

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

181 {
182 $title = ilObject::_lookupTitle($a_role_id);
183 switch(substr($title, 0, 8))
184 {
185 case 'il_crs_a':
186 case 'il_grp_a':
188
189 case 'il_crs_t':
191
192 case 'il_crs_m':
193 default:
195
196 }
197 }
static _lookupTitle($a_id)
lookup object title

References $title, ilObject\_lookupTitle(), MEMBERSHIP_ADMIN, MEMBERSHIP_MEMBER, and MEMBERSHIP_TUTOR.

Referenced by updateMemberRoles().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNumberOfMembers()

ilParticipant::getNumberOfMembers ( )

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

294 {
295 return $this->numMembers;
296 }

References $numMembers.

◆ getUserId()

ilParticipant::getUserId ( )

get user id

Returns
int

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

248 {
249 return $this->usr_id;
250 }

References $usr_id.

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

+ Here is the caller graph for this function:

◆ isAdmin()

ilParticipant::isAdmin ( )

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

279 {
280 return $this->admins;
281 }

References $admins.

◆ isAssigned()

ilParticipant::isAssigned ( )

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

269 {
270 return (bool) $this->participants;
271 }

References $participants.

◆ isBlocked()

ilParticipant::isBlocked ( )

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

253 {
254 return (bool) $this->participants_status[$this->getUserId()]['blocked'];
255 }
getUserId()
get user id

References getUserId().

+ Here is the call graph for this function:

◆ isContact()

ilParticipant::isContact ( )

Check if user is contact for current object.

Returns
bool

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

263 {
264 return (bool) $this->participants_status[$this->getUserId()]['contact'];
265 }

References getUserId().

+ Here is the call graph for this function:

◆ isMember()

ilParticipant::isMember ( )

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

274 {
275 return (bool) $this->members;
276 }

References $members.

◆ isParticipant()

ilParticipant::isParticipant ( )

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

289 {
290 return (bool) $this->participants;
291 }

References $participants.

◆ isTutor()

ilParticipant::isTutor ( )

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

284 {
285 return (bool) $this->tutors;
286 }

References $tutors.

◆ lookupStatusByMembershipRoleType()

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

lookup assignment status @global ilDB $ilDB

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

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

208 {
209 global $ilDB;
210
211 $query = 'SELECT * FROM obj_members '.
212 'WHERE obj_id = '.$ilDB->quote($a_obj_id,'integer').' '.
213 'AND usr_id = '.$ilDB->quote($a_usr_id).' ';
214 $res = $ilDB->query($query);
215 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
216 {
217 switch($a_membership_role_type)
218 {
220 return $row->admin;
221
223 return $row->tutor;
224
226 return $row->member;
227 }
228 }
229 return 0;
230 }

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, MEMBERSHIP_ADMIN, MEMBERSHIP_MEMBER, and MEMBERSHIP_TUTOR.

Referenced by updateMemberRoles().

+ Here is the caller graph for this function:

◆ readParticipant()

ilParticipant::readParticipant ( )
protected

Read participant.

Returns
void

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

304 {
305 global $rbacreview,$ilObjDataCache,$ilLog;
306
307 $this->roles = $rbacreview->getRolesOfRoleFolder($this->ref_id,false);
308
309 $users = array();
310 $this->participants = array();
311 $this->members = $this->admins = $this->tutors = array();
312
313 $member_roles = array();
314
315 foreach($this->roles as $role_id)
316 {
317 $title = $ilObjDataCache->lookupTitle($role_id);
318 switch(substr($title,0,8))
319 {
320 case 'il_crs_m':
321 $member_roles[] = $role_id;
322 $this->role_data[IL_CRS_MEMBER] = $role_id;
323 if($rbacreview->isAssigned($this->getUserId(),$role_id))
324 {
325 $this->participants = true;
326 $this->members = true;
327 }
328 break;
329
330 case 'il_crs_a':
331 $this->role_data[IL_CRS_ADMIN] = $role_id;
332 if($rbacreview->isAssigned($this->getUserId(),$role_id))
333 {
334 $this->participants = true;
335 $this->admins = true;
336 }
337 break;
338
339 case 'il_crs_t':
340 $this->role_data[IL_CRS_TUTOR] = $role_id;
341 if($rbacreview->isAssigned($this->getUserId(),$role_id))
342 {
343 $this->participants = true;
344 $this->tutors = true;
345 }
346 break;
347
348 case 'il_grp_a':
349 $this->role_data[IL_GRP_ADMIN] = $role_id;
350 if($rbacreview->isAssigned($this->getUserId(),$role_id))
351 {
352 $this->participants = true;
353 $this->admins = true;
354 }
355 break;
356
357 case 'il_grp_m':
358 $member_roles[] = $role_id;
359 $this->role_data[IL_GRP_MEMBER] = $role_id;
360 if($rbacreview->isAssigned($this->getUserId(),$role_id))
361 {
362 $this->participants = true;
363 $this->members = true;
364 }
365 break;
366
367 default:
368
369 $member_roles[] = $role_id;
370 if($rbacreview->isAssigned($this->getUserId(),$role_id))
371 {
372 $this->participants = true;
373 $this->members = true;
374 }
375 break;
376 }
377 }
378 $this->numMembers = $rbacreview->getNumberOfAssignedUsers((array) $member_roles);
379 }

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

Referenced by __construct().

+ Here is the caller graph for this function:

◆ readParticipantStatus()

ilParticipant::readParticipantStatus ( )
protected

Read participant status @global ilDB $ilDB.

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

386 {
387 global $ilDB;
388
389 $query = "SELECT * FROM obj_members ".
390 "WHERE obj_id = ".$ilDB->quote($this->obj_id ,'integer')." ".
391 'AND usr_id = '.$ilDB->quote($this->getUserId(),'integer');
392
393 $res = $ilDB->query($query);
394 $this->participants_status = array();
395 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
396 {
397 $this->participants_status[$this->getUserId()]['blocked'] = $row->blocked;
398 $this->participants_status[$this->getUserId()]['notification'] = $row->notification;
399 $this->participants_status[$this->getUserId()]['passed'] = $row->passed;
400 // cognos-blu-patch: begin
401 $this->participants_status[$this->getUserId()]['contact'] = $row->contact;
402 // cognos-blu-patch: end
403 }
404 }

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, and getUserId().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateContact()

ilParticipant::updateContact (   $a_usr_id,
  $a_contact 
)

@global ilDB $ilDB

Parameters
type$a_usr_id
type$a_contact
Returns
boolean

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

561 {
562 global $ilDB;
563
564 $ilDB->manipulate(
565 'UPDATE obj_members SET '.
566 'contact = '.$ilDB->quote($a_contact,'integer').' '.
567 'WHERE obj_id = '.$ilDB->quote($this->obj_id,'integer').' '.
568 'AND usr_id = '.$ilDB->quote($a_usr_id,'integer'));
569
570 $this->participants_status[$a_usr_id]['contact'] = $a_contact;
571 return TRUE;
572 }

References $ilDB.

◆ updateMemberRoles()

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

Update member roles @global ilDB $ilDB.

Parameters
type$a_obj_id
type$a_role_id
type$a_status

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

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 {
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
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
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(ilDBConstants::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
163 $query = 'DELETE from obj_members '.
164 'WHERE obj_id = '.$ilDB->quote($a_obj_id,'integer').' '.
165 'AND usr_id = '.$ilDB->quote($a_usr_id,'integer').' '.
166 'AND admin = '.$ilDB->quote(0,'integer').' '.
167 'AND tutor = '.$ilDB->quote(0,'integer').' '.
168 'AND member = '.$ilDB->quote(0,'integer');
169 $ilDB->manipulate($query);
170
171 ilLoggerFactory::getLogger('mem')->debug($query);
172
173
174 }
static getLogger($a_component_id)
Get component logger.
static lookupStatusByMembershipRoleType($a_obj_id, $a_usr_id, $a_membership_role_type)
lookup assignment status @global ilDB $ilDB
static getMembershipRoleType($a_role_id)

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilLoggerFactory\getInstance(), ilLoggerFactory\getLogger(), getMembershipRoleType(), lookupStatusByMembershipRoleType(), MEMBERSHIP_ADMIN, MEMBERSHIP_MEMBER, and MEMBERSHIP_TUTOR.

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

+ 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.

@access public

Parameters
intusr_id
boolpassed

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

584 {
585 global $ilDB;
586
587 $this->participants_status[$a_usr_id]['notification'] = (int) $a_notification;
588
589 $query = "SELECT * FROM obj_members ".
590 "WHERE obj_id = ".$ilDB->quote($this->obj_id ,'integer')." ".
591 "AND usr_id = ".$ilDB->quote($a_usr_id ,'integer');
592 $res = $ilDB->query($query);
593 if($res->numRows())
594 {
595 $query = "UPDATE obj_members SET ".
596 "notification = ".$ilDB->quote((int) $a_notification ,'integer')." ".
597 "WHERE obj_id = ".$ilDB->quote($this->obj_id ,'integer')." ".
598 "AND usr_id = ".$ilDB->quote($a_usr_id ,'integer');
599 }
600 else
601 {
602 $query = "INSERT INTO obj_members (notification,obj_id,usr_id,passed,blocked) ".
603 "VALUES ( ".
604 $ilDB->quote((int) $a_notification ,'integer').", ".
605 $ilDB->quote($this->obj_id ,'integer').", ".
606 $ilDB->quote($a_usr_id ,'integer').", ".
607 $ilDB->quote(0,'integer').", ".
608 $ilDB->quote(0,'integer').
609 ")";
610
611 }
612 $res = $ilDB->manipulate($query);
613 return true;
614 }

References $ilDB, $query, and $res.

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

◆ MEMBERSHIP_MEMBER

const ilParticipant::MEMBERSHIP_MEMBER = 3

◆ MEMBERSHIP_TUTOR

const ilParticipant::MEMBERSHIP_TUTOR = 2

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