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

Database activity fails to import preset when presets are stored in subfolders

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9.1
    • 1.9
    • None
    • Windows Server 2003
      Apache 2.0.59
      MySQL 5.0.51a
      PHP 5.2.5
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      Database presets will not import when they are contained in a subfolder.

      Steps to reproduce: (Using Moodle 1.9 + Build 20080410)

      1. In the files area create a folder called "test"
      2. upload the preset to the newly created "test" folder
      (I had used the buzz preset see http://moodle.org/mod/forum/discuss.php?d=84050&parent=371801)

      3. Create a new database activity (I had only set the name and introduction, the rest of the settings were left as the defaults)
      4. Import the buzz preset from the import tab.
      (See attached screenshot1.png)

      5. Moodle generates the following error: "Can't unzip file"
      (See attached screenshot2.png)
      This only occurs if the preset is contained in a sub folder. If the preset is contained in the root of the course files area it will unzip properly.

      The problem seems be be with line 156 of mod/data/preset.php

        1. screenshot1.png
          107 kB
          Stephen Bourget
        2. screenshot2.png
          89 kB
          Stephen Bourget

            dongsheng Dongsheng Cai
            sbourget Stephen Bourget
            Petr Skoda Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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