- ...
This commit is contained in:
parent
812f441c3b
commit
ef6b98f036
@ -19,7 +19,7 @@ class ReportBuilder
|
|||||||
|
|
||||||
// get IDs
|
// get IDs
|
||||||
$tests = $testMgr->getResultsByGameId($gameid, $filter, $ordering, true, $groupFilter);
|
$tests = $testMgr->getResultsByGameId($gameid, $filter, $ordering, true, $groupFilter);
|
||||||
$ids = array_map(fn($test) => $test->getId(), $tests);
|
$ids = array_map(fn($test) => $test["_id"], $tests);
|
||||||
|
|
||||||
// generate stats
|
// generate stats
|
||||||
return $testMgr->generateDetailedStats($gameid, $ids);
|
return $testMgr->generateDetailedStats($gameid, $ids);
|
||||||
|
@ -532,8 +532,7 @@ function generate_report_by_groups(ReqHandler &$rh, array $params): string
|
|||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$gameid = trim($params["gameid"]);
|
$gameid = trim($params["gameid"]);
|
||||||
$filter = trim($params["filter"]);
|
$filter = trim($params["filter"] ?? "");
|
||||||
$ordering = trim($params["orderby"]);
|
|
||||||
$groups = explode_list(trim($params["groups"])); // TODO: lehessen több csoportra is
|
$groups = explode_list(trim($params["groups"])); // TODO: lehessen több csoportra is
|
||||||
|
|
||||||
$game = $gameMgr->getGame($gameid);
|
$game = $gameMgr->getGame($gameid);
|
||||||
@ -546,7 +545,7 @@ function generate_report_by_groups(ReqHandler &$rh, array $params): string
|
|||||||
// assemble report
|
// assemble report
|
||||||
$report = new Report($game->getName());
|
$report = new Report($game->getName());
|
||||||
foreach ($groups as $groupname) {
|
foreach ($groups as $groupname) {
|
||||||
$stats = ReportBuilder::getStatsByFilters($gameid, $filter, $groupname, $ordering);
|
$stats = ReportBuilder::getStatsByFilters($gameid, $filter, $groupname, "");
|
||||||
$section = new ReportSection($groupname, $stats);
|
$section = new ReportSection($groupname, $stats);
|
||||||
$report->addSection($section);
|
$report->addSection($section);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user