ILIAS  Release_5_0_x_branch Revision 61816
 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  const COMPONENT_NAME = 'Modules/Course';
38 
39  protected static $instances = array();
40 
47  public function __construct($a_obj_id,$a_usr_id)
48  {
49  $this->type = 'crs';
50 
51  $this->NOTIFY_DISMISS_SUBSCRIBER = 1;
52  $this->NOTIFY_ACCEPT_SUBSCRIBER = 2;
53  $this->NOTIFY_DISMISS_MEMBER = 3;
54  $this->NOTIFY_BLOCK_MEMBER = 4;
55  $this->NOTIFY_UNBLOCK_MEMBER = 5;
56  $this->NOTIFY_ACCEPT_USER = 6;
57  $this->NOTIFY_ADMINS = 7;
58  $this->NOTIFY_STATUS_CHANGED = 8;
59  $this->NOTIFY_SUBSCRIPTION_REQUEST = 9;
60 
61  $this->NOTIFY_REGISTERED = 10;
62  $this->NOTIFY_UNSUBSCRIBE = 11;
63  $this->NOTIFY_WAITING_LIST = 12;
64 
65  parent::__construct(self::COMPONENT_NAME,$a_obj_id,$a_usr_id);
66  }
67 
77  public static function _getInstanceByObjId($a_obj_id,$a_usr_id)
78  {
79  if(self::$instances[$a_obj_id][$a_usr_id])
80  {
81  return self::$instances[$a_obj_id][$a_usr_id];
82  }
83  return self::$instances[$a_obj_id][$a_usr_id] = new ilCourseParticipant($a_obj_id,$a_usr_id);
84  }
85 
86 }
87 ?>