Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ARC-Support
public projects
lou-server
Commits
e147d7fd
Commit
e147d7fd
authored
Sep 22, 2021
by
Maik Messerschmidt
Browse files
Improved CSV-Export of non-string values.
parent
0a1f6aeb
Changes
1
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/ResultController.php
View file @
e147d7fd
...
...
@@ -130,10 +130,11 @@ class ResultController extends Controller
->
map
(
function
(
$row
)
use
(
$header
,
$id_header
,
$id_format
,
$id
)
{
foreach
(
$header
as
$key
)
{
// Fill empty columns with N/A
$row
[
$key
]
=
$row
[
$key
]
??
config
(
'experiment.n-a-text'
);
// Replace arrays with json
if
(
is_array
(
$row
[
$key
]))
if
(
$row
[
$key
]
===
null
)
$row
[
$key
]
=
config
(
'experiment.n-a-text'
);
else
if
(
is_string
(
$row
[
$key
]))
;
// pass
else
$row
[
$key
]
=
json_encode
(
$row
[
$key
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment