Is there a functionality in moodle 2.0.3 through which i can download the entire course in a single folder or zipped folder which they can used on my system.The back up file which is being downloaded now using the backup and restore feature can not be opened for use on system, it can only be used for restoring the course contents.
Is there any option available for teachers or students to download the course contents (Lectures only for students) in a zipped folder.
If you change the extension of the backup file to "zip", you can open it with any archiver program. If you use Windows and have 7zip installed, you can use it to open the backup file without having to change its extension.
By changing the extension i wont be able to use the files on my system.i want to view the lecture files like word files and pdf and assignment files on my system.in backup folder there are xml files which i don't want .i want .pdf and .word etc files to be downloaded on my system.
How can i download all the course contents so that i can view them offline for reading purpose.
I sincerely think that the best way (or the least convoluted way) to get the files you need would be to download them directly from the course itself.
But just in case you really want to get them from the backup file (an ".mbz" file) you downloaded (using the backup and restore feature), here it goes...
The backup file can actually be opened with the 7zip (http://www.7-zip.org/) program I mentioned. Once you open the file, you need to extract:
- The files.xml file.
- The files directory (folder).
Next step would be to open the "files.xml" file, and:
- Search for the name of each file you want to get.
- Take note of the value of the corresponding contenthash tag.
- In the "files" folder you extracted, locate the file whose name is the same as the value of the contenthash and which will always be located in a folder whose name corresponds to the two first characters of the file name.
For example, lets assume I have a "backup_courses-120730.mbz" file of which I already extracted the "files.xml" file and the "files" folder, and that I'm looking for a PDF file named "Leadership.pdf".
So I open the files.xml file and:
1. Search for the string "Leadership.pdf", which in my case I find under the following <file id...> group tag:
2. I take note of the corresponding contenthash value: fb6cf43a9b2d432403c70a2cb4c340dbb6225631.
3. As the first two characters of the contenthash are "fb", I open the "fb" folder inside the "files" directory (which I previously extracted), and there I will find a file named "fb6cf43a9b...", so now I can rename that file as "Leadership.pdf", and then move it to another location (where I'll gather all the files I need from the backup).
While I've described as a manual procedure the steps to be followed, the process can be simplified, however for that you would need to be fluent working from a command line window and using grep (or some other regular expression utility), etc. For example:
grep "filename|contenthash" files.xml > results.bat
and then do a macro from within a text editor to convert each pair of lines like:
into something like:
mv fb6cf43a9b2d432403c70a2cb4c340dbb6225631 ..\Liderazgo.pdf
As I initially said, it will be easier if you simply download the required files from the course itself
Thanks for the detailed reply.Though it's the long procedure but i will try that as well.
Actually i wanted to download all the course content in one click like the way in MIT courseware just to facilitate students.
i am in a process of writing a new piece of code to download course material in a zip file and i will share that code with the moodle community as well.
Thnx and Regards,
Any news on automating this process? Were you able to create code to download a zip of resources?
For me this would be a useful addition to Moodle
Students at my University are currently given (via the Intranet) the ability of downloading the course files. Having this feature in Moodle would allow the 'on the fly' creation and download of a zipped repository of, for example, a course handbook. The students could then both view the handbook offline and take it with them on completion of their studies.
Currently this is a manual and logistically problematic process creating unnecessary admin that must be repeated as and when the course notes change.
Any movement on this?
This is a big headache for some of the courses we have on a non-academic Moodle. We have courses that are setup for faculty searches in which there are numerous files (40 candidates x 3+files each). Downloading them individually is a pain. Getting them through the .mbz is worse.
Our institution is also looking for a way to allow students to download the entire contents of a course easily. At the moment we provide a CD to each student with the contents of the course at the end of the year but that is a tedious process for our IT department, creating individualised CDs. It would be good to put the onus on the students to grab the contents themselves off Moodle with a one button approach. When we have suggested to them that they can do it already the response has been dismay that they would have to individually download each item and save it. So we are looking also for a plug in - It looked as if Hina was onto it but he hasn't posted back here.
If anybody out there is still looking for a solution to download all course files. you may find it here:
I just installed it on my test server and allready love it. Hope it helps you as well.
Hi, I wonder if you could help? Could you tell me what the directory name should be as I'm getting this error when trying to install the plugin
Pluin is defective or outdated, can not continue, sorry
Debug info: Invalid plugin directory name .
In Version 2.9 I downloaded the zip-File in a created 'plugins'-folder, unzipped it and then moved the folder 'material_download' to the folder moodle/blocks
mv plugins/material_download moodle/blocks
Sorry for the late answer.
I have created a small jar file that will automatically get all the files stored inside the "files" folder of your moodle's backup .mbz file.
1. Use your command-line prompt and run java -jar DownloadAll.jar
2. Type the full path of your .mbz file and press Enter
Hopefully this will help
Thank you much for this!!!!!! Problem solved. Would you by any chance be willing to share the source code for that jar file?
I did have to make one minor adjustment in the procedures. The mbz files are now tar'd rather than zipped. I did have to "untar" them into the directory before I could get the command to run. But otherwise all OK.
Can I have the latest DownloadAll.jar file for Moodle 3.0 please.
You are a lifesaver.
We are switching from Moodle to Firefly and want to get all our files off. A lot of teachers that uploaded resources have left the school and so Moodle is our only copy. This is perfect.
The fact that Moodle does not provide such a feature is one of the many reasons why we're switching. I know Moodle is free, but things like this should be standard. Moodle is primarily a resource hosting tool.
"Moodle is primarily a resource hosting tool."
No, that is an innaccurate criticim of Moodle. People may use it as a resource hosting tool but the underlying design is specifically about interaction.
The emphasis on interaction can be seen in some of the modules, for example, Forum, Quiz,Workshop, assignment,book,chat,choice,forum,lesson, lti, quiz, scorm, survey, wiki, glossary, and if you are willing to use 3rd party tools a very wide range of additional interactive tools.
I am really struggling how to use download.jar. As I have never heard about it.
Please describe me whole procedure to unzip .mbz file with this in detail.
It will be great help of me..!! Hope to get reply soon from you .
I installed java and run the jar file but then i got the error and blank folder is created named as backup.
I don't know why it was not able to extract . Throwing error related to unzip file.
You may refer screenshot and please come out me for some solution.
I have solved a similar issue, although my use case is different.
Sometimes I need to debug the course and to do so I need all files related to the course. Downloading whole Moodle data to the development environment may not be an option. What I have done is a moosh command that list all the files related to a course. With conjunction with some other UNIX commands, it is quite simple to create a package containing all the files (see documentation):
moosh file-list -i course=2 | moosh file-path -s -r | tar -C $(moosh config-get core dataroot) -T - -cjf files.tar.bz2
Those files are taken directly from Moodle data directory, then packed. They can then be copied into another Moodle installation, in your case you could use them as resources but bear in mind that the file names will be SHA sums.
I have a faculty who is retiring this summer, and wants to get all of his word, pdf, picture files etc... to be archived from Moodle mbz file. Does Moodle has a plugin to extract the mbz file to regular file format from Moodle backup mbz file? Is there an easy way to extract the file? Thanks.