forked from the-distro/ofborg
The log API grows new features..
This commit is contained in:
parent
d16bdccf70
commit
ec23188698
|
@ -49,6 +49,14 @@ if ($handle = opendir($req)) {
|
||||||
$d['attempts'][$attempt] = [];
|
$d['attempts'][$attempt] = [];
|
||||||
}
|
}
|
||||||
$d['attempts'][$attempt]['metadata'] = $metadata;
|
$d['attempts'][$attempt]['metadata'] = $metadata;
|
||||||
|
} elseif (substr($entry, -strlen(".result.json"),strlen(".result.json")) == ".result.json") {
|
||||||
|
$metadata = json_decode(file_get_contents($req . '/' . $entry), JSON_OBJECT_AS_ARRAY);
|
||||||
|
$attempt = $metadata['attempt_id'];
|
||||||
|
if (!isset($d['attempts'][$attempt])) {
|
||||||
|
$d['attempts'][$attempt] = [];
|
||||||
|
}
|
||||||
|
$d['attempts'][$attempt]['result'] = $metadata;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (!isset($d['attempts'][$entry])) {
|
if (!isset($d['attempts'][$entry])) {
|
||||||
$d['attempts'][$entry] = [];
|
$d['attempts'][$entry] = [];
|
||||||
|
|
Loading…
Reference in a new issue