Issue Details (XML | Word | Printable)

Key: MDL-14317
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dongsheng Cai
Reporter: Stephen Bourget
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

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

Created: 11/Apr/08 03:00 AM   Updated: 22/Apr/08 03:16 PM
Return to search
Component/s: Database activity module
Affects Version/s: 1.9
Fix Version/s: 1.9.1

File Attachments: None
Image Attachments:

1. screenshot1.png
(107 kB)

2. screenshot2.png
(89 kB)
Environment:
Windows Server 2003
Apache 2.0.59
MySQL 5.0.51a
PHP 5.2.5
Issue Links:
Relates
 

Database: MySQL
Participants: Dongsheng Cai, Eloy Lafuente (stronk7), Petr Skoda and Stephen Bourget
Security Level: None
QA Assignee: Petr Skoda
Resolved date: 16/Apr/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
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

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dongsheng Cai committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 16/Apr/08 11:23 AM
MDL-14317, fix parameter type, see tracker, thanks Stephen
MODIFY mod/data/preset.php   Rev. 1.24.2.3    (+2 -2 lines)
Dongsheng Cai committed 1 file to 'Moodle CVS' - 16/Apr/08 11:24 AM
MDL-14317, fix parameter type, see tracker, thanks Stephen, merged from MOODLE_19_STABLE
MODIFY mod/data/preset.php   Rev. 1.28    (+2 -2 lines)