4 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceTableGUI.php';
26 $this->
setId(
'tos_agreement_by_lng');
35 $this->
setTitle($this->lng->txt(
'tos_agreement_by_lng'));
37 $this->
addColumn($this->lng->txt(
'language'),
'language');
38 $this->
addColumn($this->lng->txt(
'tos_agreement'),
'agreement');
39 $this->
addColumn($this->lng->txt(
'tos_agreement_document'),
'agreement_document');
42 foreach($this->visibleOptionalColumns as $column)
44 $this->
addColumn($this->optionalColumns[$column][
'txt'], $column);
47 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj,
'applyAgreementByLanguageFilter'));
49 $this->
setRowTemplate(
'tpl.tos_agreement_by_lng_table_row.html',
'Services/TermsOfService');
53 require_once
'Services/jQuery/classes/class.iljQueryUtil.php';
54 require_once
'Services/YUI/classes/class.ilYuiUtil.php';
69 $cols = array(
'agreement_document_modification_ts' => array(
'txt' => $this->lng->txt(
'tos_last_modified'),
'default' =>
true));
80 foreach($data[
'items'] as &
$row)
82 $row[
'language'] = $this->lng->txt(
'meta_l_' . $row[
'language']);
92 if(is_string($row[
'agreement_document']) && strlen($row[
'agreement_document']))
94 $this->ctrl->setParameter($this->
getParentObject(),
'agreement_document', rawurlencode($row[
'agreement_document']));
95 $row[
'content_link'] = $this->ctrl->getLinkTarget($this->
getParentObject(),
'getAgreementTextByFilenameAsynch',
'',
true,
false);
96 $this->ctrl->setParameter($this->
getParentObject(),
'agreement_document',
'');
98 $row[
'id'] = md5($row[
'language']);
102 $row[
'missing_agreement_css_class'] =
'warning';
111 return array(
'id',
'language',
'agreement',
'missing_agreement_css_class',
'agreement_document',
'content_link',
'img_down',
'language_key');
121 if($column ==
'agreement_document')
123 if(!is_string($row[$column]) || !strlen($row[$column]))
125 return $this->lng->txt(
'tos_agreement_document_missing');
128 else if($column ==
'agreement')
132 return $this->lng->txt(
'tos_agreement_exists');
136 return $this->lng->txt(
'tos_agreement_missing');
139 else if($column ==
'agreement_document_modification_ts')
144 return $row[$column];
153 if(
'agreement_document_modification_ts' == $column)