allow NULL-values for answers for Questtype ?Multiple Choice?

This commit is contained in:
coderkun 2014-04-21 13:17:39 +02:00
commit 89b2bee286

View file

@ -81,12 +81,13 @@
// Get answers
$userAnswers = $this->getUserAnswers($quest['id'], $question['id']);
$answers = $this->Multiplechoice->getAnswersOfQuestion($question['id']);
var_dump($userAnswers);
var_dump($answers);
// Match answers with user answers
foreach($answers as &$answer)
{
if(is_null($answer['tick'])) {
continue;
}
if($answer['tick']) {
if(!array_key_exists($answer['pos']-1, $userAnswers)) {
return false;