add count of Stations for each Character group (implements #139)

This commit is contained in:
oliver 2016-02-02 10:02:17 +01:00
commit 03cc6a475b
5 changed files with 68 additions and 19 deletions

View file

@ -118,8 +118,16 @@
}
}
// Get Character groups-groups
// Get Character groups
$groups = $this->Charactergroups->getGroupsForQuest($quest['id']);
foreach($groups as &$group)
{
// Get count of solved Stations
$group['stations'] = $this->Charactergroupsqueststations->getSolvedStationsForQuestAndGroup(
$quest['id'],
$group['id']
);
}
// Get uploads
$uploads = $this->Charactergroupsquests->getMediaForQuest($quest['id']);
@ -172,6 +180,14 @@
// Get Character groups
$groups = $this->Charactergroups->getGroupsForGroupsgroup($groupsgroup['id']);
foreach($groups as &$group)
{
// Get count of solved Stations
$group['stations'] = $this->Charactergroupsqueststations->getSolvedStationsForQuestAndGroup(
$quest['id'],
$group['id']
);
}
// Get allowed mimetypes
$mimetypes = \nre\configs\AppConfig::$mimetypes['charactergroupsquests'];

View file

@ -98,7 +98,7 @@
$stations = $this->Charactergroupsqueststations->getStationsForQuest($quest['id']);
}
elseif(!is_null($charactergroup)) {
$stations = $this->Charactergroupsqueststations->getStationsForQuestAndGroup($quest['id'], $charactergroup['id']);
$stations = $this->Charactergroupsqueststations->getEnteredStationsForQuestAndGroup($quest['id'], $charactergroup['id']);
}