23 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
24 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
59 $this->user_id = $a_usr_id;
60 $this->obj_id = $a_obj_id;
83 $query =
"SELECT * FROM member_agreement ".
84 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
89 $user_data[
$row->usr_id][
'accepted'] =
$row->accepted;
90 $user_data[
$row->usr_id][
'acceptance_time'] =
$row->acceptance_time;
92 return $user_data ? $user_data : array();
107 $query =
"SELECT * FROM member_agreement ".
108 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
112 return $res->numRows() ?
true :
false;
127 $query =
"SELECT * FROM member_agreement ".
128 "WHERE accepted = 1";
131 return $res->numRows() ?
true :
false;
146 $query =
"SELECT accepted FROM member_agreement ".
147 "WHERE usr_id = ".$ilDB->quote($a_usr_id ,
'integer').
" ".
148 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
152 return $row->accepted == 1 ?
true :
false;
164 $query =
"SELECT usr_id FROM member_agreement ".
165 "WHERE obj_id = ".$ilDB->quote($a_obj_id,
'integer').
' '.
172 $user_ids[] =
$row[
'usr_id'];
191 $query =
"DELETE FROM member_agreement ".
192 "WHERE usr_id =".$ilDB->quote($a_usr_id ,
'integer').
" ";
209 $query =
"DELETE FROM member_agreement ".
210 "WHERE obj_id =".$ilDB->quote($a_obj_id ,
'integer').
" ";
229 $query =
"UPDATE member_agreement SET accepted = 0 ";
246 $query =
"UPDATE member_agreement ".
248 "WHERE obj_id = ".$ilDB->quote($a_container_id ,
'integer').
" ";
262 $this->accepted = $a_status;
274 $this->acceptance_time = $a_timest;
289 return $this->accepted ?
false :
true;
328 $query =
"INSERT INTO member_agreement (usr_id,obj_id,accepted,acceptance_time) ".
330 $this->db->quote($this->user_id ,
'integer').
", ".
331 $this->db->quote($this->obj_id ,
'integer').
", ".
332 $this->db->quote((
int) $this->
isAccepted() ,
'integer').
", ".
345 public function delete()
349 $query =
"DELETE FROM member_agreement ".
350 "WHERE usr_id = ".$this->db->quote($this->user_id ,
'integer').
" ".
351 "AND obj_id = ".$this->db->quote($this->obj_id ,
'integer');
363 $query =
"SELECT * FROM member_agreement ".
364 "WHERE usr_id = ".$this->db->quote($this->user_id ,
'integer').
" ".
365 "AND obj_id = ".$this->db->quote($this->obj_id ,
'integer').
" ";
370 $this->accepted =
$row->accepted;
371 $this->acceptance_time =
$row->acceptance_time;