4 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceTableDatabaseDataProvider.php';
20 'tos_acceptance_track.tosv_id',
25 'tos_acceptance_track.ts',
31 return implode(
', ', $fields);
42 'INNER JOIN tos_acceptance_track ON tos_acceptance_track.usr_id = ud.usr_id',
43 'INNER JOIN tos_versions ON tos_versions.id = tos_acceptance_track.tosv_id',
46 return 'usr_data ud ' . implode(
' ', $joins);
58 if (isset($filter[
'query']) && strlen($filter[
'query'])) {
59 $where[] =
'(' . implode(
' OR ',
array(
60 $this->db->like(
'ud.login',
'text',
'%' . $filter[
'query'] .
'%'),
61 $this->db->like(
'ud.firstname',
'text',
'%' . $filter[
'query'] .
'%'),
62 $this->db->like(
'ud.lastname',
'text',
'%' . $filter[
'query'] .
'%'),
63 $this->db->like(
'ud.email',
'text',
'%' . $filter[
'query'] .
'%')
67 if (isset($filter[
'lng']) && strlen($filter[
'lng'])) {
68 $where[] =
'tos_versions.lng = ' . $this->db->quote($filter[
'lng'],
'text');
71 if (isset($filter[
'period']) && is_array($filter[
'period'])) {
72 $where[] =
'(' . implode(
' AND ',
array(
73 'tos_acceptance_track.ts >= ' . $this->db->quote($filter[
'period'][
'start'],
'integer'),
74 'tos_acceptance_track.ts <= ' . $this->db->quote($filter[
'period'][
'end'],
'integer')
78 return implode(
' AND ', $where);
109 if (isset($params[
'order_field'])) {
110 if (!is_string($params[
'order_field'])) {
114 if (!in_array($params[
'order_field'],
array(
'lng',
'login',
'firstname',
'lastname',
'src',
'ts'))) {
118 if ($params[
'order_field'] ==
'ts') {
119 $params[
'order_field'] =
'tos_acceptance_track.ts';
122 if (!isset($params[
'order_direction'])) {
123 $params[
'order_direction'] =
'ASC';
124 } elseif (!in_array(strtolower($params[
'order_direction']),
array(
'asc',
'desc'))) {
128 return $params[
'order_field'] .
' ' . $params[
'order_direction'];
getOrderByPart(array $params, array $filter)
getGroupByPart(array $params, array $filter)
getWherePart(array $params, array $filter)
getSelectPart(array $params, array $filter)
Create styles array
The data for the language used.
getFromPart(array $params, array $filter)
getHavingPart(array $params, array $filter)