Moodle
  1. Moodle
  2. MDL-7176

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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

        1. MDL-7176_excellib.class.php.patch
          0.7 kB
          Paulo Matos
        2. MDL-7176-oldlib.patch
          1 kB
          Paulo Matos

          Issue Links

            Activity

            Hide
            Paulo Matos added a comment -

            MDL-7176_excellib.class.php.patch

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

            fixed in cvs, thanks for the report and patch!

            Show
            Petr Skoda added a comment - fixed in cvs, thanks for the report and patch!
            Hide
            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 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 added a comment -

            MDL-7176-oldlib.patch

            Show
            Paulo Matos added a comment - MDL-7176 -oldlib.patch
            Hide
            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 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
            Petr Skoda added a comment -

            Comment fixed in cvs, bug title changed. Thanks!

            Show
            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: