<table class="overview-table"> <center><strong>Previous answers</center></strong> <thead> <tr> <td>Section Text</td> <td>Book Title</td> <td>Class Name</td> <td>Answer</td> </tr> </thead> <?php foreach ($answerList as $answer) { ?> <tr> <td><?php echo AllModel::getTruncatedSectionText($answer['section_id']); ?> </td> <td><?php echo AllModel::getBookTitle($answer['book_id']); ?> </td> <td><?php echo AllModel::getClassName($answer['class_id']); ?> </td> <td><?php echo $answer['tag']; ?> </td> </tr>
<td>Section Text</td> <td>Number of answers</td> <td>Dominant Tag</td> <td>Agreement (%)</td> </tr> </thead> <?php foreach ($this->section_data as $section) { ?> <tr> <td><?php echo AllModel::getBookTitle($section->book_id); ?> </td> <td><?php echo AllModel::getTruncatedSectionText($section->section_id); ?> </td> <td><?php echo $section->num_answers; ?> </td> <td><?php echo $section->dominant_tag; ?> </td> <td><?php $res = (double) $section->dominant_tag_count / (double) $section->num_answers; if ($res > 0.7) { echo '<font color="green">'; echo $res;