Moodle sometimes corrupts uploaded MS Word files.

Moodle sometimes corrupts uploaded MS Word files.

by Jan Dierckx -
Number of replies: 10

Our school uses Moodle 1.6.2. Students uploaded MS Word files for an assignment. In some cases the content is garbled. See screenshot.

I am pretty sure that it is Moodle corrupting the files: inside the garbled content there is always a Moodle username which was not present before the students uploaded the file (We checked on the student's pc).

Any idea what could be causing this problem? We checked:

  • the filter setting for uploaded files. (disabled)

  • opening files with openoffice instead. Same problem.

  • using firefox instead of IE

  • using ftp to download the files from the moddata directory

Attachment conv.jpg
Average of ratings: -
In reply to Jan Dierckx

Help! Moodle corrupts uploaded MS Word files.

by Jan Dierckx -
Here is the original file. This file was submitted to Moodle...
In reply to Jan Dierckx

Re: Help! Moodle corrupts uploaded MS Word files.

by Jan Dierckx -
And this is how it ended up inside our moodledata directory.

I noticed some other people reporting corrupted Powerpoint and Word files after uploading them to Moodle.

No one has any idea?
In reply to Jan Dierckx

Re: Help! Moodle corrupts uploaded MS Word files.

by Ralf Hilgenstock -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Translators
Hi Jan,

I tested your file and it works correct for me.

Your screenshot shows the file with UTF8 encoding. What happens in ISO? Why are you using UTF8? I think the problem is based in the UTF8 problem.



Ralf

In reply to Ralf Hilgenstock

Re: Help! Moodle corrupts uploaded MS Word files.

by Jan Dierckx -

Ralf,

Thanks for answering. Do you mean you can open both of these files and the result is the same?

We have been using Moodle ever since version 1.1.1, and upgarding never caused problems. Our upgrade to Moodle 1.6 during the summer holidays has caused us nothing but trouble. Moodle 1.6 introduced utf8 support - could this somehow relate to the file being UTf8 encoded?

This discussion reports a similar problem.

In reply to Jan Dierckx

Re: Help! Moodle corrupts uploaded MS Word files.

by Ralf Hilgenstock -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Translators
Hi Jan,

no the original file works fine for me and I could upload and download it correct on one of my systems. I saw that there is a difference between the file in encoding ISO and utf8.

You are writing about trouble with 1,6 update. Did you finalize the 1.6 Update correct? Did you make the UTF8 migration?
Can you also check the database settings? Are they all moved to utf8?


ralf
In reply to Ralf Hilgenstock

Re: Help! Moodle corrupts uploaded MS Word files.

by Ger Tielemans -

I can import the first file in the WYSIWYG under 1.6/UTF8.

When I open the first file in OpenOffice, I see the icons phone and envelop

but in the WYSIWYG under 1.6/UTF8 I see a writinghand for the first two icons (phone + envelop) and a Questionmark for all the others.

OpenOffice thinks that the second file is western-europe something.. but shows a mass

In reply to Ralf Hilgenstock

HELP!! Moodle corrupts uploaded files?

by Jan Dierckx -

We did finalize the 1.6 update.

We are using MySQL 4.1.15 and we made the UTF8 migration (after some hesitation because depending on who you talk to 4.1.16 or 4.1.12 or minimum requiremants)

All my database settings are moved to UTF8.

Are there other things I could check? Trusting Moodle to correctly store uploaded files is vital for it's acceptance in our institute.

In reply to Jan Dierckx

Re: HELP!! Moodle corrupts uploaded files?

by Jan Dierckx -
No solution?
In reply to Jan Dierckx

Re: HELP!! Moodle corrupts uploaded files?

by Paul Nijbakker -
Hello Jan,

I have unfortunately no solution either, but I can sympathise since we have been experiencing a load of problems too since upgrading to 1.6. We have not (yet) experienced problems with uploaded word documents in assignments, but we have the same problem as you described when trying to open or download Word documents from the wiki tool. We use Moodle 1.6.4+. (Incidentally, for languages with non-Latin letters (like Dutch or French) MySql 4.1.16 is suggested as minimum.)

The other day we discovered that the conversion of our database was not in fact successful (even though it went smoothly without errors), and that that may be the cause of many of our utf8 related problems. You may want to check whether all MySql database fields (Text and Varchar) have in fact a utf8_unicode_ci collation, or whether any Latin1 collation remains. I have been told that changing that collation now, would severely mess up our database and I am looking for a bright idea on how to deal with this problem.

Rgrds,
Paul.
In reply to Ralf Hilgenstock

Moodle sometimes corrupts uploaded files. HELP!

by Jan Dierckx -

The original file is the file before it got somehow corrupted by Moodle. Students' grades depend on what they uploaded. I just want to make sure that students can trust Moodle not to mangle with the content of their assignments.