Course loosing files after uplaod

Course loosing files after uplaod

by Narissa Tuawhiorangi -
Number of replies: 3
Picture of Core developers

Hi all

I have a course a tutor is having trouble with.  I am having a problem replicating the issue myself (I've tried quite a few times with no luck).  The tutor has uploaded files to the course and later when she goes back into the course the files have disappeared.    They are not in the file repository either.

Error

I've done some internet research and not finding anything that helps.  I am running Windows (don't be a hater), IIS.  I have no problems like this with any other courses as far as I am aware. 

I'm not sure if this helps but I downloaded a backup of the course to see what was there.  I have trolled through the files.xml file and renamed all the resources to see what is missing etc.  There are 35 instances of non existent files as follows:

<file id="85750"> <contenthash>da39a3ee5e6b4b0d3255bfef95601890afd80709</contenthash> <contextid>38926</contextid> <component>user</component> <filearea>icon</filearea> <itemid>0</itemid> <filepath>/</filepath> <filename>.</filename> <userid>$@NULL@$</userid> <filesize>0</filesize> <mimetype>$@NULL@$</mimetype> <status>0</status> <timecreated>1404163037</timecreated> <timemodified>1404163037</timemodified> <source>$@NULL@$</source> <author>$@NULL@$</author> <license>$@NULL@$</license> <sortorder>0</sortorder> <repositorytype>$@NULL@$</repositorytype> <repositoryid>$@NULL@$</repositoryid> <reference>$@NULL@$</reference> /file>

These records are also showing in the database.

One of the our Moodle managers had the same problem with the course so I'm sure its not a PEBKAC issue, but as I said before I can't seem to replicate it.  I've tried uploading the same files, different files, renaming the files to remove spaces, brackets etc.

So my questions:

Has anyone had the same issue?
Did you fix it and how?
Can I clean the course and/or the database of these records somehow?
Can I delete the records directly from the file table?
Any suggestions on what I could try?

I have been thinking of rebuilding the course from scratch but it is a massive first year nursing course with many modules, glossaries, 75+ files, etc.

Any suggestions greatly appreciated. TIA

Average of ratings: -
In reply to Narissa Tuawhiorangi

Re: Course loosing files after uplaod

by Narissa Tuawhiorangi -
Picture of Core developers

opps, Moodle removed my <pre> formatting

file.xml

In reply to Narissa Tuawhiorangi

Re: Course loosing files after uplaod

by Gareth Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Narissa,

Ok, I don't know what the solution is, but here is some information to help you:

Cheers,

Gareth

In reply to Gareth Barnard

Re: Course loosing files after uplaod

by Narissa Tuawhiorangi -
Picture of Core developers

Thanks Gareth

The files don't exist. the SHA1 hash of nothing is da39a3ee5e6b4b0d3255bfef95601890afd80709 which is what the content hash is (does that make sense?).  Thanks for the File API link.  I've discovered a book inside the course full of broken links, brought over by a restore from our old Moodle 1.9.  I'll delete the book and the records from the database and see if that helps.

cheers
Narissa