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

Excel export may return a zero bytes file - problem with excel temp directory

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.3, 1.6.4, 1.7
    • Fix Version/s: 1.6.4, 1.7, 1.8
    • Component/s: Libraries
    • Labels:
      None
    • Environment:
      linux, and probably all others with permissions enforcement
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE

      Description

      Problem:
      Can't write temp file. It reports no errors at all.

      Solution:
      Add to excellib.class.php constructor MoodleExcelWorkbook
      $this->pear_excel_workbook->setTempDir($CFG->dataroot."/temp");

      Foruns:
      http://moodle.org/mod/forum/discuss.php?d=53302

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              paulo.matos Paulo Matos added a comment -

              MDL-7176_excellib.class.php.patch

              Show
              paulo.matos Paulo Matos added a comment - MDL-7176 _excellib.class.php.patch
              Hide
              skodak Petr Skoda added a comment -

              fixed in cvs, thanks for the report and patch!

              Show
              skodak Petr Skoda added a comment - fixed in cvs, thanks for the report and patch!
              Hide
              paulo.matos Paulo Matos added a comment -

              It also affects the excel's oldlib that might be in use by some modules.
              I'm attaching the patch to it as well.

              Paulo.

              Show
              paulo.matos Paulo Matos added a comment - It also affects the excel's oldlib that might be in use by some modules. I'm attaching the patch to it as well. Paulo.
              Hide
              paulo.matos Paulo Matos added a comment -

              MDL-7176-oldlib.patch

              Show
              paulo.matos Paulo Matos added a comment - MDL-7176 -oldlib.patch
              Hide
              paulo.matos Paulo Matos added a comment -

              Hi Petr!

              I noticed that you added to the Summary 'when system temp not writable', that's not quite true with the actual excelllib.class, because it tries to write
              the temp file at "current working directory".

              In the old lib that's true.

              Cheers,

              Paulo

              Show
              paulo.matos Paulo Matos added a comment - Hi Petr! I noticed that you added to the Summary 'when system temp not writable', that's not quite true with the actual excelllib.class, because it tries to write the temp file at "current working directory". In the old lib that's true. Cheers, Paulo
              Hide
              skodak Petr Skoda added a comment -

              Comment fixed in cvs, bug title changed. Thanks!

              Show
              skodak Petr Skoda added a comment - Comment fixed in cvs, bug title changed. Thanks!

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    7/Nov/06