Moodle 2.0 Course Conversion(Second Edition)
上QQ阅读APP看书,第一时间看更新

Time for action – packing files together

The first task is to pack all the files you are taking with you to Moodle. The kind of file we need to create is called a "zip" file. ZIP files are very easy to create and can contain almost any kind of file (certainly the kinds you will be using for your learning materials). For example, in Windows simply highlight the files you want to upload. Then, right-click on any one of the highlighted files, slide down to Send To, then select Compressed (zipped) Folder. You can also perform the same trick on an entire folder—even one that contains its own subfolders. When the ZIP files are unpacked, the files remember which folders they were in. Different operating systems have different ways of creating ZIP files, so if you've never heard of a ZIP file, or you have never created one before, then your best option is to speak to your administrator or, if you have one, the help desk. If you are lucky they may even create the file for you.

I've got all of my Backyard Ballistics files in a single folder on my PC, and I've packed all of the documents I need into a file called ballistics.zip. Here's what I need to do, and you can follow the same process for your ZIP file:

  1. Upload ballistics.zip to Moodle (following the same procedure as before).
  2. Once ballistics.zip is uploaded I can see it listed on the My private files page. Next to the name of each file is a context menu button:
    Time for action – packing files together
  3. Because the ZIP file is a special file packed with other files, I have the option to "Unzip" (that is, unpack all the documents within it). Select Unzip in the context menu:
    Time for action – packing files together
  4. Moodle displays the files and/or folders it has unpacked from ballistics.zip:
    Time for action – packing files together
  5. Press the Save changes button.
  6. That's it, we're done! Two new folders, Videos and Handouts, with all my files in them have been created:
    Time for action – packing files together

What just happened?

We uploaded a ZIP file containing lots of resource files, and then unzipped it on the Moodle server.

ZIP files are a special kind of file that can contain many other files within them. This means that we can use them to move lots of files into Moodle without uploading them one at a time. And it's not just files you can pack into a ZIP. You can ZIP up entire folder structures, too.

Moodle has the ability to turn that ZIP file back into a set of separate files. When we click on unzip, Moodle takes all of the files out of the ZIP file, and adds them to the current folder.

Dealing with oversize zip files

We've seen how we can pack all the files we need into a single file (and if we are lucky, a helpful administrator will do it for us) and this allows us to upload lots of files all in one go.

We still need to watch out for the limits on file sizes, and if the maximum file upload size is too small for the ZIP file you've just created then you could:

  • Create more than one ZIP file.
  • Seek advice from your administrator (who may well have to upload the file for you). If everything is packed into one ZIP file that your admin can upload in one go, they probably won't mind so much. In fact there are many ways of getting lots of files uploaded to Moodle and your admin might need to think about implementing one of them (for example, WebDAV) if this is a frequent problem.

Note

If Moodle is trying to unpack/decompress particularly large files (but they are smaller than Moodle's file upload limit) then unpacking the files might time out. The solution is to pack the files into the ZIP without compressing them. This will require a compression utility capable of doing this, for example WinZip. If you are experiencing problems and are unsure of what you can do to solve them, speak to your Moodle admin.

Zipping folders

As mentioned previously, zips can also contain folders and subfolders, so you could assemble all your course material into neat subfolders on your own computer, all within one "resources" folder, and zip up the whole thing. When you unzip it, Moodle will recreate your folder structure for you.

Now we've got our files uploaded let's get our course files area organized.

Removing the ZIP file when you have unpacked it

ZIP files aren't automatically deleted when you unpack them, even though we have finished with them. We need to manually remove them, which we cover in the next section.

Removing files

There will obviously come a time, aside from deleting a redundant ZIP file, when you need to remove a file from your course files area (perhaps you've just uploaded one you didn't mean to). Deleting files from the course files area is easy. In fact, remember when I uploaded a bunch of files all in one go and I mentioned that I needed to delete the ZIP file after I had finished with it? Let's do that now.