37 $this->log =
$DIC->logger()->lti();
38 $this->db =
$DIC->database();
40 $this->ref_id = $a_ref_id;
41 $this->consumer_id = $a_ext_consumer_id;
49 $this->admin = $a_role;
59 $this->tutor = $a_role;
69 $this->member = $a_role;
83 $this->consumer_id = $a_consumer_id;
95 public function delete()
97 $query =
'DELETE FROM lti_int_provider_obj ' .
98 'WHERE ref_id = ' . $this->db->quote($this->ref_id,
'integer') .
' ' .
99 'AND ext_consumer_id = ' . $this->db->quote($this->
getConsumerId(),
'integer');
100 $this->db->manipulate(
$query);
107 $query =
'INSERT INTO lti_int_provider_obj ' .
108 '(ref_id,ext_consumer_id,admin,tutor,member) VALUES( ' .
109 $this->db->quote($this->ref_id,
'integer') .
', ' .
111 $this->db->quote($this->getAdminRole(),
'integer') .
', ' .
112 $this->db->quote($this->getTutorRole(),
'integer') .
', ' .
113 $this->db->quote($this->getMemberRole(),
'integer') .
115 $this->db->manipulate(
$query);
124 if (!$this->ref_id) {
128 $query =
'SELECT * FROM lti_int_provider_obj ' .
129 'WHERE ref_id = ' . $this->db->quote($this->ref_id,
'integer') .
' ' .
130 'AND ext_consumer_id = ' . $this->db->quote($this->
getConsumerId(),
'integer');
133 while ($row =
$res->fetchObject()) {
134 $this->ref_id = $row->ref_id;
135 $this->consumer_id = $row->ext_consumer_id;
136 $this->admin = $row->admin;
137 $this->tutor = $row->tutor;
138 $this->member = $row->member;
An exception for terminatinating execution or to throw for unit testing.
__construct($a_ref_id, $a_ext_consumer_id)
Constructor @global type $DIC.
read()
Read object settings.
setConsumerId($a_consumer_id)
Set consumer id.
foreach($_POST as $key=> $value) $res