ILIAS  release_4-4 Revision
ilOrgUnitAssignment Class Reference

Organisation Unit Assignment. More...

+ Collaboration diagram for ilOrgUnitAssignment:

Public Member Functions

 __construct ($org_unit_id, $user_id)
 
 create ()
 
 update ()
 
 delete ()
 
 getUserId ()
 
 setReportingAccess ($a_reporting_access)
 
 hasReportingAccess ()
 
 setCcComplianceInvitation ($a_cc_compl_invit)
 
 hasCcComplianceInvitation ()
 
 setCcComplianceNotify1 ($a_cc_compl_not1)
 
 hasCcComplianceNotify1 ()
 
 setCcComplianceNotify2 ($a_cc_compl_not2)
 
 hasCcComplianceNotify2 ()
 

Private Attributes

 $org_unit_id = 0
 
 $user_id = 0
 
 $reporting_access = false
 
 $cc_compl_invit = false
 
 $cc_compl_not1 = false
 
 $cc_compl_not2 = false
 

Detailed Description

Organisation Unit Assignment.

Author
Bjoern Heyser bheys.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 14 of file class.ilOrgUnitAssignment.php.

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitAssignment::__construct (   $org_unit_id,
  $user_id 
)

Definition at line 24 of file class.ilOrgUnitAssignment.php.

References $org_unit_id, and $user_id.

25  {
26  $this->org_unit_id = (int)$org_unit_id;
27  $this->user_id = (int)$user_id;
28  }

Member Function Documentation

◆ create()

ilOrgUnitAssignment::create ( )

Definition at line 30 of file class.ilOrgUnitAssignment.php.

31  {
32  global $ilDB;
33 
34  $ilDB->insert('org_unit_assignments', array(
35  'oa_ou_id' => array('integer', (int)$this->org_unit_id),
36  'oa_usr_id' => array('integer', (int)$this->user_id),
37  'oa_reporting_access' => array('integer', (int)$this->reporting_access),
38  'oa_cc_compl_invit' => array('integer', (int)$this->cc_compl_invit),
39  'oa_cc_compl_not1' => array('integer', (int)$this->cc_compl_not1),
40  'oa_cc_compl_not2' => array('integer', (int)$this->cc_compl_not2)
41  ));
42  }

◆ delete()

ilOrgUnitAssignment::delete ( )

Definition at line 62 of file class.ilOrgUnitAssignment.php.

References $query.

63  {
64  global $ilDB;
65 
66  $query = "DELETE FROM org_unit_assignments ".
67  "WHERE oa_ou_id = %s AND oa_usr_id = %s";
68 
69  $ilDB->queryF(
70  $query,
71  array('integer', 'integer'),
72  array($this->org_unit_id, $this->user_id)
73  );
74  }

◆ getUserId()

ilOrgUnitAssignment::getUserId ( )

Definition at line 76 of file class.ilOrgUnitAssignment.php.

References $user_id.

◆ hasCcComplianceInvitation()

ilOrgUnitAssignment::hasCcComplianceInvitation ( )

Definition at line 98 of file class.ilOrgUnitAssignment.php.

References $cc_compl_invit.

◆ hasCcComplianceNotify1()

ilOrgUnitAssignment::hasCcComplianceNotify1 ( )

Definition at line 109 of file class.ilOrgUnitAssignment.php.

References $cc_compl_not1.

◆ hasCcComplianceNotify2()

ilOrgUnitAssignment::hasCcComplianceNotify2 ( )

Definition at line 120 of file class.ilOrgUnitAssignment.php.

References $cc_compl_not2.

◆ hasReportingAccess()

ilOrgUnitAssignment::hasReportingAccess ( )

Definition at line 87 of file class.ilOrgUnitAssignment.php.

References $reporting_access.

◆ setCcComplianceInvitation()

ilOrgUnitAssignment::setCcComplianceInvitation (   $a_cc_compl_invit)

Definition at line 92 of file class.ilOrgUnitAssignment.php.

93  {
94  $this->cc_compl_invit = (bool)$a_cc_compl_invit;
95  return $this;
96  }

◆ setCcComplianceNotify1()

ilOrgUnitAssignment::setCcComplianceNotify1 (   $a_cc_compl_not1)

Definition at line 103 of file class.ilOrgUnitAssignment.php.

104  {
105  $this->cc_compl_not1 = (bool)$a_cc_compl_not1;
106  return $this;
107  }

◆ setCcComplianceNotify2()

ilOrgUnitAssignment::setCcComplianceNotify2 (   $a_cc_compl_not2)

Definition at line 114 of file class.ilOrgUnitAssignment.php.

115  {
116  $this->cc_compl_not2 = (bool)$a_cc_compl_not2;
117  return $this;
118  }

◆ setReportingAccess()

ilOrgUnitAssignment::setReportingAccess (   $a_reporting_access)

Definition at line 81 of file class.ilOrgUnitAssignment.php.

82  {
83  $this->reporting_access = (bool)$a_reporting_access;
84  return $this;
85  }

◆ update()

ilOrgUnitAssignment::update ( )

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

45  {
46  global $ilDB;
47 
48  $ilDB->insert('org_unit_assignments',
49  array(
50  'oa_reporting_access' => array('integer', (int)$this->reporting_access),
51  'oa_cc_compl_invit' => array('integer', (int)$this->cc_compl_invit),
52  'oa_cc_compl_not1' => array('integer', (int)$this->cc_compl_not1),
53  'oa_cc_compl_not2' => array('integer', (int)$this->cc_compl_not2)
54  ),
55  array(
56  'oa_ou_id' => array('integer', (int)$this->org_unit_id),
57  'oa_usr_id' => array('integer', (int)$this->user_id)
58  )
59  );
60  }

Field Documentation

◆ $cc_compl_invit

ilOrgUnitAssignment::$cc_compl_invit = false
private

Definition at line 20 of file class.ilOrgUnitAssignment.php.

Referenced by hasCcComplianceInvitation().

◆ $cc_compl_not1

ilOrgUnitAssignment::$cc_compl_not1 = false
private

Definition at line 21 of file class.ilOrgUnitAssignment.php.

Referenced by hasCcComplianceNotify1().

◆ $cc_compl_not2

ilOrgUnitAssignment::$cc_compl_not2 = false
private

Definition at line 22 of file class.ilOrgUnitAssignment.php.

Referenced by hasCcComplianceNotify2().

◆ $org_unit_id

ilOrgUnitAssignment::$org_unit_id = 0
private

Definition at line 16 of file class.ilOrgUnitAssignment.php.

Referenced by __construct().

◆ $reporting_access

ilOrgUnitAssignment::$reporting_access = false
private

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

Referenced by hasReportingAccess().

◆ $user_id

ilOrgUnitAssignment::$user_id = 0
private

Definition at line 17 of file class.ilOrgUnitAssignment.php.

Referenced by __construct(), and getUserId().


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