restore Character answres for all Questtypes if Character has not already solved the Quest

This commit is contained in:
coderkun 2014-04-24 17:17:20 +02:00
commit aba2100fb3
6 changed files with 11 additions and 9 deletions

View file

@ -119,13 +119,15 @@
}
// Get Character answers
if($this->request->getGetParam('show-answer') == 'true')
if($this->request->getGetParam('show-answer') == 'true' || !$this->Quests->hasCharacterSolvedQuest($quest['id'], $character['id']))
{
foreach($choiceLists as &$list) {
$list['answer'] = $this->Choiceinput->getCharacterSubmission($list['id'], $character['id']);
}
}
print_r($choiceLists);
// Pass data to view
$this->set('texts', $textParts);