3 declare(strict_types=1);
    42     public function __construct(
int $a_ref_id, 
int $a_ext_consumer_id)
    47         $this->db = $DIC->database();
    49         $this->ref_id = $a_ref_id;
    50         $this->consumer_id = $a_ext_consumer_id;
    54             $this->log->warning(
"no ref_id set");
    61         $this->admin = $a_role;
    71         $this->tutor = $a_role;
    81         $this->member = $a_role;
    94         $this->consumer_id = $a_consumer_id;
   106     public function delete(): 
void   108         $query = 
'DELETE FROM lti_int_provider_obj ' .
   109             'WHERE ref_id = ' . $this->db->quote($this->ref_id, 
'integer') . 
' ' .
   110             'AND ext_consumer_id = ' . $this->db->quote($this->
getConsumerId(), 
'integer');
   111         $this->db->manipulate($query);
   118         $query = 
'INSERT INTO lti_int_provider_obj ' .
   119             '(ref_id,ext_consumer_id,admin,tutor,member) VALUES( ' .
   120             $this->db->quote($this->ref_id, 
'integer') . 
', ' .
   122             $this->db->quote($this->
getAdminRole(), 
'integer') . 
', ' .
   123             $this->db->quote($this->
getTutorRole(), 
'integer') . 
', ' .
   126         $this->db->manipulate($query);
   132     protected function read(): bool
   134         if (!$this->ref_id) {
   138         $query = 
'SELECT * FROM lti_int_provider_obj ' .
   139             'WHERE ref_id = ' . $this->db->quote($this->ref_id, 
'integer') . 
' ' .
   140             'AND ext_consumer_id = ' . $this->db->quote($this->
getConsumerId(), 
'integer');
   142         $res = $this->db->query($query);
   143         while ($row = 
$res->fetchObject()) {
   144             $this->ref_id = (
int) $row->ref_id;
   145             $this->consumer_id = (
int) $row->ext_consumer_id;
   146             $this->admin = (
int) $row->admin;
   147             $this->tutor = (
int) $row->tutor;
   148             $this->member = (
int) $row->member;
 
setConsumerId(int $a_consumer_id)
Set consumer id. 
 
static getLogger(string $a_component_id)
Get component logger. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setAdminRole(int $a_role)
 
__construct(int $a_ref_id, int $a_ext_consumer_id)
Constructor. 
 
read()
Read object settings. 
 
Component logger with individual log levels by component id. 
 
setMemberRole(int $a_role)
 
setTutorRole(int $a_role)