merge branch ?charactergroupsqueststations?
This commit is contained in:
parent
ba97244b15
commit
76ba31c04e
18 changed files with 351 additions and 84 deletions
|
|
@ -103,15 +103,31 @@
|
|||
$station['id'],
|
||||
$charactergroup['id']
|
||||
);
|
||||
$station['solved'] = $this->Charactergroupsqueststations->hasCharactergroupSolvedStation(
|
||||
$station['id'],
|
||||
$charactergroup['id']
|
||||
);
|
||||
if($station['entered']) {
|
||||
$station['tried'] = $this->Charactergroupsqueststations->hasCharactergroupTriedStation(
|
||||
$station['id'],
|
||||
$charactergroup['id']
|
||||
);
|
||||
if($station['tried']) {
|
||||
$station['solved'] = $this->Charactergroupsqueststations->hasCharactergroupSolvedStation(
|
||||
$station['id'],
|
||||
$charactergroup['id']
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 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']);
|
||||
|
|
@ -164,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'];
|
||||
|
|
@ -219,7 +243,6 @@
|
|||
if(!is_null($this->request->getPostParam('deletemedia')))
|
||||
{
|
||||
$uploadIds = $this->request->getPostParam('uploads');
|
||||
var_dump($uploadIds);
|
||||
foreach($uploadIds as $uploadId) {
|
||||
$this->Uploads->deleteSeminaryupload($uploadId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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']);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -169,10 +169,16 @@
|
|||
{
|
||||
$groups = $this->Charactergroups->getGroupsForQueststation($station['id']);
|
||||
foreach($groups as &$group) {
|
||||
$group['solved'] = $this->Charactergroupsqueststations->hasCharactergroupSolvedStation(
|
||||
$group['tried'] = $this->Charactergroupsqueststations->hasCharactergroupTriedStation(
|
||||
$station['id'],
|
||||
$group['id']
|
||||
);
|
||||
if($group['tried']) {
|
||||
$group['solved'] = $this->Charactergroupsqueststations->hasCharactergroupSolvedStation(
|
||||
$station['id'],
|
||||
$group['id']
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -194,9 +200,9 @@
|
|||
$solved = false;
|
||||
$tried = false;
|
||||
if(!is_null($charactergroup)) {
|
||||
$solved = $this->Charactergroupsqueststations->hasCharactergroupSolvedStation($station['id'], $charactergroup['id']);
|
||||
if(!$solved) {
|
||||
$tried = $this->Charactergroupsqueststations->hasCharactergroupTriedStation($station['id'], $charactergroup['id']);
|
||||
$tried = $this->Charactergroupsqueststations->hasCharactergroupTriedStation($station['id'], $charactergroup['id']);
|
||||
if($tried) {
|
||||
$solved = $this->Charactergroupsqueststations->hasCharactergroupSolvedStation($station['id'], $charactergroup['id']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,6 @@
|
|||
$validation = $this->Validation->addValidationResult($validation, 'title', 'exist', true);
|
||||
}
|
||||
$text = $this->request->getPostParam('text');
|
||||
var_dump($text);
|
||||
|
||||
// Edit
|
||||
if($validation === true)
|
||||
|
|
|
|||
|
|
@ -452,6 +452,7 @@
|
|||
array_key_exists('achievements', $elements),
|
||||
array_key_exists('charactergroupsgroups', $elements),
|
||||
array_key_exists('charactergroupsquests', $elements),
|
||||
array_key_exists('charactergroupsqueststations', $elements),
|
||||
array_key_exists('map', $elements)
|
||||
);
|
||||
$seminary = $this->Seminaries->getSeminaryById($seminaryId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue