diff --git a/lib/Value/AnswerChecker.pm b/lib/Value/AnswerChecker.pm index fb4dacb06c..31f4a52d07 100644 --- a/lib/Value/AnswerChecker.pm +++ b/lib/Value/AnswerChecker.pm @@ -555,57 +555,57 @@ sub format_matrix_HTML { my ($rows, $cols) = (scalar(@{$array}), scalar(@{ $array->[0] })); my $HTML = ""; my $class = 'class="ans_array_cell"'; - my $cell = "display:table-cell;vertical-align:middle;"; + my $cell = "display:table-cell;vertical-align:middle;text-align:center;"; my $pad = "padding:4px 0;"; - if ($sep) { $sep = '' . $sep . '' } - else { $sep = '' } - $sep = '' . $sep . ''; + if ($sep) { $sep = '
' . $sep . '
' } + else { $sep = '
' } + $sep = '' . $sep . '
'; if ($options{top_labels}) { $HTML .= - '
' . join($sep, @{ $options{top_labels} }) - . ''; + . '
'; } foreach my $i (0 .. $rows - 1) { $HTML .= - '
' . join($sep, EVALUATE(@{ $array->[$i] })) - . ''; + . '
'; } - $HTML = '' . $HTML . ''; + $HTML = '
' . $HTML . '
'; $open = $self->format_delimiter($open, $rows, $options{tth_delims}); $close = $self->format_delimiter($close, $rows, $options{tth_delims}); if ($open ne '' || $close ne '') { my $delim = "display:inline-block; vertical-align:middle;"; $HTML = - '' . $open - . '' + . '' . $HTML - . '' . $close - . ''; + . ''; } - return '' . $HTML - . ''; + . ''; } sub EVALUATE {