Moodle

ppt lesson import incorrectly stores images into moddata which is not compatible with backup

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.8
  • Fix Version/s: None
  • Component/s: Lesson
  • Labels:
    None
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE

Description

After the lesson backup (including the user data), moddata/lesson directory is not included in the backup file. As a consequence, all the lesson images are lost in a restore.

Images were inserted using Import PowerPoint option.

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

This goes to Michael...

Show
Eloy Lafuente (stronk7) added a comment - This goes to Michael...
Hide
Michael Penney added a comment -

I'm going to pass this to Mark.

Show
Michael Penney added a comment - I'm going to pass this to Mark.
Hide
Mark Nielsen added a comment -

Did you include course files in the backup? I don't think lesson should not do its own file backup/restore.

Show
Mark Nielsen added a comment - Did you include course files in the backup? I don't think lesson should not do its own file backup/restore.
Hide
Ivana Bosnic added a comment -

Yes, I checked the "user data" next to the lesson, and also included Course files. The images are originally in moddata/lesson/lesson_name, and they are not copied in the backup ZIP.

Show
Ivana Bosnic added a comment - Yes, I checked the "user data" next to the lesson, and also included Course files. The images are originally in moddata/lesson/lesson_name, and they are not copied in the backup ZIP.
Hide
Mark Nielsen added a comment -

Looked through the backup code and it looks like the modules are responsible for backing up content in the moddata directory. When I coded this, I was not too clever about the directory naming structure Should be moddata/lesson/lessonid. Since I used the lesson name, there is no way to identify 100% of the time which directories in moddata/lesson actually need to be backed up.

The solution might be that we convert to the proper method and then any new imports would work with backup/restore automatically while old imports the files will have to be moved manually.

I think just copying over the whole moddata/lesson directory every time is not a good solution because it could copy over data that is not needed (EG: user data is not selected for a specific lesson).

Show
Mark Nielsen added a comment - Looked through the backup code and it looks like the modules are responsible for backing up content in the moddata directory. When I coded this, I was not too clever about the directory naming structure Should be moddata/lesson/lessonid. Since I used the lesson name, there is no way to identify 100% of the time which directories in moddata/lesson actually need to be backed up. The solution might be that we convert to the proper method and then any new imports would work with backup/restore automatically while old imports the files will have to be moved manually. I think just copying over the whole moddata/lesson directory every time is not a good solution because it could copy over data that is not needed (EG: user data is not selected for a specific lesson).
Hide
Michael Penney added a comment -

Going to need to fix this in 2.0 or drop powerpoint import - this was my bad idea, since MS changes the structure of the powerpoint export this is very expensive to maintain.

Show
Michael Penney added a comment - Going to need to fix this in 2.0 or drop powerpoint import - this was my bad idea, since MS changes the structure of the powerpoint export this is very expensive to maintain.
Hide
Martin Dougiamas added a comment -

Reassigning this to moodle.com for the time being, since Mark Nielsen is not maintaining Lesson any more. Please comment/vote/patch any crucial bugs that affect you for 2.0 to help us prioritise fixes for the upcoming release.

Show
Martin Dougiamas added a comment - Reassigning this to moodle.com for the time being, since Mark Nielsen is not maintaining Lesson any more. Please comment/vote/patch any crucial bugs that affect you for 2.0 to help us prioritise fixes for the upcoming release.
Hide
Tomaz Lasic added a comment -

Possibly related:
Had a course with lessons that contain images. These (images) were course files in 1.9.
Since upgrading the site to 2.0 (School Demo), the images in both lessons have disappeared, files missing.

Show
Tomaz Lasic added a comment - Possibly related: Had a course with lessons that contain images. These (images) were course files in 1.9. Since upgrading the site to 2.0 (School Demo), the images in both lessons have disappeared, files missing.
Hide
Petr Škoda (skodak) added a comment -

Hello,
the problem is that moddata should not be touched by users directly, it is intended for data created by module code.

You can not put any images into moddata folders manually, sorry. Please move your images to standard course files and update links from text.

Petr Skoda

Show
Petr Škoda (skodak) added a comment - Hello, the problem is that moddata should not be touched by users directly, it is intended for data created by module code. You can not put any images into moddata folders manually, sorry. Please move your images to standard course files and update links from text. Petr Skoda
Hide
Ivana Bosnic added a comment -

Hi, Petr,

maybe I wasn't clear when describing the bug. I didn't put any images manually, nor messed with moddata directory. The images, which are a part of the imported PPT, were inserted automatically via import PPT process in the lesson. Hope it makes more sense now.

Show
Ivana Bosnic added a comment - Hi, Petr, maybe I wasn't clear when describing the bug. I didn't put any images manually, nor messed with moddata directory. The images, which are a part of the imported PPT, were inserted automatically via import PPT process in the lesson. Hope it makes more sense now.
Hide
Petr Škoda (skodak) added a comment -

Oh! That would be a serious bug in the lesson import process, it should not put any images into moddata because it is linked from text stored in database.

Reopening, somebody will have to write a fix for this at least in 2.0 upgrade.

Show
Petr Škoda (skodak) added a comment - Oh! That would be a serious bug in the lesson import process, it should not put any images into moddata because it is linked from text stored in database. Reopening, somebody will have to write a fix for this at least in 2.0 upgrade.
Hide
Petr Škoda (skodak) added a comment -

I have create a new issue for the lesson upgrade problem MDL-23781.

Unfortunately it is not easy to fix this in 1.8.x or 1.9.x, sorry.

Show
Petr Škoda (skodak) added a comment - I have create a new issue for the lesson upgrade problem MDL-23781. Unfortunately it is not easy to fix this in 1.8.x or 1.9.x, sorry.
Hide
Petr Škoda (skodak) added a comment -

Sorry for the noise, I should have read all comments, but at least I can now deal with this issue during the 2.0 upgrade.
Thank you for the report.

Show
Petr Škoda (skodak) added a comment - Sorry for the noise, I should have read all comments, but at least I can now deal with this issue during the 2.0 upgrade. Thank you for the report.
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it has become inactive and does not appear to affect a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it has become inactive and does not appear to affect a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Dates

  • Created:
    Updated:
    Resolved: