The log API grows new features..

This commit is contained in:
Graham Christensen 2018-03-11 11:19:07 -04:00
parent d16bdccf70
commit ec23188698
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C

View file

@ -49,6 +49,14 @@ if ($handle = opendir($req)) {
$d['attempts'][$attempt] = [];
}
$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 {
if (!isset($d['attempts'][$entry])) {
$d['attempts'][$entry] = [];