4 require_once
'Services/TermsOfService/interfaces/interface.ilTermsOfServiceAcceptanceDataGateway.php';
31 $query =
'SELECT id FROM tos_versions WHERE hash = %s AND lng = %s';
32 $res = $this->db->queryF(
34 array(
'text',
'text'),
38 if($this->db->numRows(
$res))
41 $tosv_id =
$row[
'id'];
45 $tosv_id = $this->db->nextId(
'tos_versions');
49 'id' =>
array(
'integer', $tosv_id),
61 'tos_acceptance_track',
63 'tosv_id' =>
array(
'integer', $tosv_id),
76 $this->db->setLimit(1, 0);
77 $res = $this->db->queryF(
' 78 SELECT tos_versions.*, tos_acceptance_track.ts accepted_ts 79 FROM tos_acceptance_track 80 INNER JOIN tos_versions ON id = tosv_id 82 ORDER BY tos_acceptance_track.ts DESC 107 $res = $this->db->queryF(
' 133 $this->db->manipulate(
'DELETE FROM tos_acceptance_track WHERE usr_id = ' . $this->db->quote($entity->
getUserId(),
'integer'));
setSourceType($source_type)
__construct(ilDBInterface $db)
ilTermsOfServiceAcceptanceDatabaseGateway constructor.
loadById(ilTermsOfServiceAcceptanceEntity $entity)
trackAcceptance(ilTermsOfServiceAcceptanceEntity $entity)
Create styles array
The data for the language used.
loadCurrentAcceptanceOfUser(ilTermsOfServiceAcceptanceEntity $entity)
deleteAcceptanceHistoryByUser(ilTermsOfServiceAcceptanceEntity $entity)
setIso2LanguageCode($language)