ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilCourseParticipant.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 include_once('./Services/Membership/classes/class.ilParticipant.php');
25 
36 {
37  protected static $instances = array();
38 
45  public function __construct($a_obj_id,$a_usr_id)
46  {
47  $this->type = 'crs';
48 
49  $this->NOTIFY_DISMISS_SUBSCRIBER = 1;
50  $this->NOTIFY_ACCEPT_SUBSCRIBER = 2;
51  $this->NOTIFY_DISMISS_MEMBER = 3;
52  $this->NOTIFY_BLOCK_MEMBER = 4;
53  $this->NOTIFY_UNBLOCK_MEMBER = 5;
54  $this->NOTIFY_ACCEPT_USER = 6;
55  $this->NOTIFY_ADMINS = 7;
56  $this->NOTIFY_STATUS_CHANGED = 8;
57  $this->NOTIFY_SUBSCRIPTION_REQUEST = 9;
58 
59  $this->NOTIFY_REGISTERED = 10;
60  $this->NOTIFY_UNSUBSCRIBE = 11;
61  $this->NOTIFY_WAITING_LIST = 12;
62 
63  parent::__construct($a_obj_id,$a_usr_id);
64  }
65 
74  public static function _getInstanceByObjId($a_obj_id,$a_usr_id)
75  {
76  if(self::$instances[$a_obj_id][$a_usr_id])
77  {
78  return self::$instances[$a_obj_id][$a_usr_id];
79  }
80  return self::$instances[$a_obj_id][$a_usr_id] = new ilCourseParticipant($a_obj_id,$a_usr_id);
81  }
82 
83 }
84 ?>