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

Trying to export a preset as a .zip file results in errors

XMLWordPrintable

    • MOODLE_22_STABLE
    • MOODLE_22_STABLE
    • wip-MDL-31396-master
    • Hide

      I had a look at a difference between the code from 2.1 and master. It appears that make_upload_directory() has been switched for make_temp_directory(). Changing it back solves the problem, but I'm sure that there is probably some reason that I'm not aware of that this line of code has been changed.

      line 3145 of /mod/data/lib.php

      $exportsubdir = "temp/mod_data/presetexport/$presetname";
      make_upload_directory($exportsubdir);

      Show
      I had a look at a difference between the code from 2.1 and master. It appears that make_upload_directory() has been switched for make_temp_directory(). Changing it back solves the problem, but I'm sure that there is probably some reason that I'm not aware of that this line of code has been changed. line 3145 of /mod/data/lib.php $exportsubdir = "temp/mod_data/presetexport/$presetname"; make_upload_directory($exportsubdir);
    • Hide

      1) Add a database module
      2) Create some fields and add one or two records.
      3) Click on the Templates tab and click Save Template at the bottom of the page. (No need to alter the template)
      4) Click on the Presets tab. Click Export under the 'Export as zip' section.
      [Test] Check to see if a dialogue box pops up asking you to save the file.
      5) Save the file.
      6) Create a new database activity.
      7) Click on the Presets tab. in the 'Import from zip file' section choose the downloaded file and then import.
      [Test] Make sure that the fields are still the same as the previous database module.

      Show
      1) Add a database module 2) Create some fields and add one or two records. 3) Click on the Templates tab and click Save Template at the bottom of the page. (No need to alter the template) 4) Click on the Presets tab. Click Export under the 'Export as zip' section. [Test] Check to see if a dialogue box pops up asking you to save the file. 5) Save the file. 6) Create a new database activity. 7) Click on the Presets tab. in the 'Import from zip file' section choose the downloaded file and then import. [Test] Make sure that the fields are still the same as the previous database module.

      When trying to export a preset in the database module as a zip file it doesn't create a file but instead displays an error "Not all files generated!"
      I've included a screen shot with the various warnings and stack trace.

            abgreeve Adrian Greeve
            abgreeve Adrian Greeve
            Andrew Davis Andrew Davis
            Sam Hemelryk Sam Hemelryk
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.