Skip to content

Commit

Permalink
MDL-27422 The excel export fails in some conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Grabs authored and Sam Hemelryk committed May 9, 2011
1 parent 8f25ae2 commit 439ae87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mod/feedback/item/multichoice/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,15 @@ function excelprint_item(&$worksheet, $rowOffset, $xlsFormats, $item, $groupid,

// $worksheet->setFormat("<l><f><ro2><vo><c:green>");
//frage schreiben
$worksheet->write_string($rowOffset, 0, $item->label, $xlsFormats->head2_green);
$worksheet->write_string($rowOffset, 1, $analysed_item[1], $xlsFormats->head2_green);
$worksheet->write_string($rowOffset, 0, $item->label, $xlsFormats->head2);
$worksheet->write_string($rowOffset, 1, $analysed_item[1], $xlsFormats->head2);
if (is_array($data)) {
$sizeofdata = sizeof($data);
for ($i = 0; $i < $sizeofdata; $i++) {
$aData = $data[$i];

// $worksheet->setFormat("<l><f><ro2><vo><c:blue>");
$worksheet->write_string($rowOffset, $i + 2, trim($aData->answertext), $xlsFormats->value_blue);
$worksheet->write_string($rowOffset, $i + 2, trim($aData->answertext), $xlsFormats->head2);

// $worksheet->setFormat("<l><vo>");
$worksheet->write_number($rowOffset + 1, $i + 2, $aData->answercount, $xlsFormats->default);
Expand Down

0 comments on commit 439ae87

Please sign in to comment.