| Línea 65... |
Línea 65... |
| 65 |
*/
|
65 |
*/
|
| 66 |
protected static function define_other_properties(): array {
|
66 |
protected static function define_other_properties(): array {
|
| 67 |
return [
|
67 |
return [
|
| 68 |
'table' => ['type' => PARAM_RAW],
|
68 |
'table' => ['type' => PARAM_RAW],
|
| 69 |
'parameters' => ['type' => PARAM_RAW],
|
69 |
'parameters' => ['type' => PARAM_RAW],
|
| - |
|
70 |
'button' => [
|
| - |
|
71 |
'type' => report_action_exporter::read_properties_definition(),
|
| - |
|
72 |
'optional' => true,
|
| - |
|
73 |
],
|
| - |
|
74 |
'infocontainer' => ['type' => PARAM_RAW],
|
| 70 |
'filterspresent' => ['type' => PARAM_BOOL],
|
75 |
'filterspresent' => ['type' => PARAM_BOOL],
|
| 71 |
'filtersapplied' => ['type' => PARAM_INT],
|
76 |
'filtersapplied' => ['type' => PARAM_INT],
|
| 72 |
'filtersform' => ['type' => PARAM_RAW],
|
77 |
'filtersform' => ['type' => PARAM_RAW],
|
| 73 |
'attributes' => [
|
78 |
'attributes' => [
|
| 74 |
'type' => [
|
79 |
'type' => [
|
| Línea 106... |
Línea 111... |
| 106 |
|
111 |
|
| 107 |
$params = (array) json_decode($parameters, true);
|
112 |
$params = (array) json_decode($parameters, true);
|
| 108 |
$table = system_report_table::create($reportid, $params);
|
113 |
$table = system_report_table::create($reportid, $params);
|
| Línea -... |
Línea 114... |
| - |
|
114 |
$table->set_filterset($filterset);
|
| - |
|
115 |
|
| - |
|
116 |
// Export global report action.
|
| - |
|
117 |
$optionalvalues = [];
|
| - |
|
118 |
if ($reportaction = $source->get_report_action()) {
|
| - |
|
119 |
$optionalvalues['button'] = $reportaction->export_for_template($output);
|
| 109 |
$table->set_filterset($filterset);
|
120 |
}
|
| 110 |
|
121 |
|
| 111 |
// Generate filters form if report uses the default form, and contains any filters.
|
122 |
// Generate filters form if report uses the default form, and contains any filters.
|
| 112 |
$filterspresent = $source->get_filter_form_default() && !empty($source->get_active_filters());
|
123 |
$filterspresent = $source->get_filter_form_default() && !empty($source->get_active_filters());
|
| 113 |
if ($filterspresent && empty($params['download'])) {
|
124 |
if ($filterspresent && empty($params['download'])) {
|
| Línea 129... |
Línea 140... |
| 129 |
}, array_keys($sourceattributes), $sourceattributes);
|
140 |
}, array_keys($sourceattributes), $sourceattributes);
|
| Línea 130... |
Línea 141... |
| 130 |
|
141 |
|
| 131 |
return [
|
142 |
return [
|
| 132 |
'table' => $output->render($table),
|
143 |
'table' => $output->render($table),
|
| - |
|
144 |
'parameters' => $parameters,
|
| 133 |
'parameters' => $parameters,
|
145 |
'infocontainer' => $source->get_report_info_container(),
|
| 134 |
'filterspresent' => $filterspresent,
|
146 |
'filterspresent' => $filterspresent,
|
| 135 |
'filtersapplied' => $source->get_applied_filter_count(),
|
147 |
'filtersapplied' => $source->get_applied_filter_count(),
|
| 136 |
'filtersform' => $filterspresent ? $filtersform->render() : '',
|
148 |
'filtersform' => $filterspresent ? $filtersform->render() : '',
|
| 137 |
'attributes' => $attributes,
|
149 |
'attributes' => $attributes,
|
| 138 |
'classes' => $classes ?? '',
|
150 |
'classes' => $classes ?? '',
|
| 139 |
];
|
151 |
] + $optionalvalues;
|
| 140 |
}
|
152 |
}
|