ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilECSParticipantConsents Class Reference
+ Collaboration diagram for ilECSParticipantConsents:

Public Member Functions

 __construct (int $server_id, int $mid)
 
 delete ()
 
 hasConsents ()
 

Protected Attributes

ilDBInterface $db
 

Private Attributes

int $server_id
 
int $mid
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilECSParticipantConsents::__construct ( int  $server_id,
int  $mid 
)

Definition at line 28 of file class.ilECSParticipantConsents.php.

29 {
30 global $DIC;
31
32 $this->db = $DIC->database();
33
34 $this->server_id = $server_id;
35 $this->mid = $mid;
36 }
global $DIC
Definition: shib_login.php:26

References $DIC, $mid, and $server_id.

Member Function Documentation

◆ delete()

ilECSParticipantConsents::delete ( )

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

38 : void
39 {
40 $query = 'DELETE FROM ecs_user_consent ' .
41 'WHERE mid = ' . $this->db->quote($this->mid, ilDBConstants::T_INTEGER) . ' ' .
42 'AND server_id = ' . $this->db->quote($this->server_id, ilDBConstants::T_INTEGER);
43 $this->db->manipulate($query);
44 }

References ilDBConstants\T_INTEGER.

◆ hasConsents()

ilECSParticipantConsents::hasConsents ( )

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

46 : bool
47 {
48 $query = 'SELECT count(*) as num FROM ecs_user_consent ' .
49 'WHERE mid = ' . $this->db->quote($this->mid, ilDBConstants::T_INTEGER) . ' ' .
50 'AND server_id = ' . $this->db->quote($this->server_id, ilDBConstants::T_INTEGER);
51 $res = $this->db->query($query);
52 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
53 return (bool) $row->num;
54 }
55 return false;
56 }
$res
Definition: ltiservices.php:69

References $res, ilDBConstants\FETCHMODE_OBJECT, and ilDBConstants\T_INTEGER.

Field Documentation

◆ $db

ilDBInterface ilECSParticipantConsents::$db
protected

Definition at line 26 of file class.ilECSParticipantConsents.php.

◆ $mid

int ilECSParticipantConsents::$mid
private

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

Referenced by __construct().

◆ $server_id

int ilECSParticipantConsents::$server_id
private

Definition at line 23 of file class.ilECSParticipantConsents.php.

Referenced by __construct().


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