Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14354

downloading excel $formatbgy->set_bg_color('yellow'); doesn't work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Component/s: Other
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Add the following two rows:

      $formatbgy =& $workbook->add_format();
      $formatbgy->set_bg_color('yellow');

      just after the $workbook definition in the function user_download_xls of the file moodle19/admin/user/user_bulk_download.php

      Then change:
      $worksheet[0]->write(0, $col, $fieldname);
      to
      $worksheet[0]->write(0, $col, $fieldname, $formatbgy);

      and:
      $worksheet[0]>write($row, $col, $user>$field);
      to
      $worksheet[0]>write($row, $col, $user>$field, $formatbgy);

      Then download the list of users in excel format.
      The expected excel file should appear with some cells with yellow background... but they are all black.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/08