| @@ 3398-3423 (lines=26) @@ | ||
| 3395 | $tableHtml .= ' <tr>'; |
|
| 3396 | for ($ii = 0; $ii <= count($question_x['answers']); $ii++) { |
|
| 3397 | if ($question_x['type'] == 'score') { |
|
| 3398 | for ($x = 1; $x <= $question_x['maximum_score']; $x++) { |
|
| 3399 | if ($ii == 0) { |
|
| 3400 | $tableHtml .= ' <th>'.$question_y['answers'][($ij)].' '.$y.'</th>'; |
|
| 3401 | break; |
|
| 3402 | } else { |
|
| 3403 | $tableHtml .= ' <td align="center">'; |
|
| 3404 | $votes = SurveyUtil::comparative_check( |
|
| 3405 | $answers_x, |
|
| 3406 | $answers_y, |
|
| 3407 | $question_x['answersid'][($ii - 1)], |
|
| 3408 | $question_y['answersid'][($ij)], |
|
| 3409 | $x, |
|
| 3410 | $y |
|
| 3411 | ); |
|
| 3412 | $tableHtml .= $votes; |
|
| 3413 | array_push( |
|
| 3414 | $chartData, |
|
| 3415 | array( |
|
| 3416 | 'serie' => array($currentYQuestion, $xOptions[$ii-1]), |
|
| 3417 | 'option' => $x, |
|
| 3418 | 'votes' => $votes |
|
| 3419 | ) |
|
| 3420 | ); |
|
| 3421 | $tableHtml .= '</td>'; |
|
| 3422 | } |
|
| 3423 | } |
|
| 3424 | } else { |
|
| 3425 | if ($ii == 0) { |
|
| 3426 | $tableHtml .= '<th>'.$question_y['answers'][$ij].' '.$y.'</th>'; |
|
| @@ 3458-3476 (lines=19) @@ | ||
| 3455 | $tableHtml .= ' <tr>'; |
|
| 3456 | for ($ii = 0; $ii <= count($question_x['answers']); $ii++) { |
|
| 3457 | if ($question_x['type'] == 'score') { |
|
| 3458 | for ($x = 1; $x <= $question_x['maximum_score']; $x++) { |
|
| 3459 | if ($ii == 0) { |
|
| 3460 | $tableHtml .= ' <th>'.$question_y['answers'][$ij].'</th>'; |
|
| 3461 | break; |
|
| 3462 | } else { |
|
| 3463 | $tableHtml .= ' <td align="center">'; |
|
| 3464 | $votes = SurveyUtil::comparative_check($answers_x, $answers_y, $question_x['answersid'][($ii-1)], $question_y['answersid'][($ij)], $x, 0); |
|
| 3465 | $tableHtml .= $votes; |
|
| 3466 | array_push( |
|
| 3467 | $chartData, |
|
| 3468 | array( |
|
| 3469 | 'serie' => array($currentYQuestion, $xOptions[$ii-1]), |
|
| 3470 | 'option' => $x, |
|
| 3471 | 'votes' => $votes |
|
| 3472 | ) |
|
| 3473 | ); |
|
| 3474 | $tableHtml .= '</td>'; |
|
| 3475 | } |
|
| 3476 | } |
|
| 3477 | } else { |
|
| 3478 | if ($ii == 0) { |
|
| 3479 | $tableHtml .= ' <th>'.$question_y['answers'][($ij)].'</th>'; |
|