add some checks to not throw IdNotFound exception for empty Quests (fixes #9)

This commit is contained in:
oliver 2015-04-09 15:52:11 +02:00
commit dec602da34
7 changed files with 68 additions and 52 deletions

View file

@ -134,12 +134,16 @@
$correctAnswersCount += $this->isMatching($field['regex'], $field['answer']);
}
}
// Show count
$showcount = (count($this->request->getGetParams()) > 1);
// Pass data to view
$this->set('task', $task);
$this->set('fields', $fields);
$this->set('count', $correctAnswersCount);
$this->set('showcount', $showcount);
}