<?php if($question->type=="RADIO"): ?>

    <?php if ($result[0]== Answer::getAnswerValue($answer->answer)): ?>
    <div class="panel panel-default">
        <div class="panel-body">
            <?php echo Answer::getAnswerName($answer->answer); ?>
        </div>
    </div>
    <?php endif; ?>

<?php elseif($question->type=="ARRAY"): ?>
    <?php foreach($group->arrayAnswer as $answer_array): ?>
        <?php if(in_array($answer_array->value,$result)): ?>
            <li class="list-group-item"><?php echo $answer_array->title; ?></li>
        <?php endif; ?>
    <?php endforeach; ?>
<?php elseif($question->type=="SEL" || $question->type=="MUL_SEL"): ?>
    <?php if(in_array(Answer::getAnswerValue($answer->answer),$result)): ?>
        <li class="list-group-item"><?php echo Answer::getAnswerName($answer->answer); ?></li>
    <?php endif; ?>
<?php elseif($question->type=="TEXT"): ?>
    <div class="panel panel-default">
        <div class="panel-body">
            <?php echo $result[0]; ?>
        </div>
    </div>
<?php elseif($question->type=="NUMERIC"): ?>
    <div class="panel panel-default">
        <div class="panel-body">
            <?php echo $result[0]; ?>
        </div>
    </div>
<?php else: ?>
    <?php echo Answer::getAnswerName($answer->answer); ?>
<?php endif; ?>

<?php if(isset($answer->questions)): ?>
    <div id="panel-answers-<?php echo $question->question; ?>" class="panel-answers panel panel-default <?php if(!in_array(Answer::getAnswerValue($answer->answer),$result)): ?> hide <?php endif; ?>">
        <div class="panel-body">
            <?php if(isset($answer->headerText)): ?>
                <blockquote><?php echo $answer->headerText; ?></blockquote>
            <?php endif; ?>
            <?php foreach($answer->questions as $answer_questions): ?>
                <?php echo $__env->make('test.result.questions',array("question"=>$answer_questions), array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <?php endforeach; ?>
        </div>
    </div>
<?php endif; ?>