Note: You are currently viewing documentation for Moodle 3.2. Up-to-date documentation for the latest stable version of Moodle is probably available here: Working with files.

Working with files: Difference between revisions

From MoodleDocs
m (Assignment can now have file type restrictions)
 
(75 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{Working with files and folders}}
{{Managing content}}
<p class="note">'''Please refer to [[Talk:Working_with_files_and_folders|page comments]] before editing this page.'''</p>
==Adding files to your course==


For the user who wants to add or find files, the file picker will be the tool they will use.   The file picker comes up within a context (any time you want to work with any kind of file).
Moodle provides an easy way for a teacher to present materials to their students. These materials may take the form of files such as word-processed documents or slideshow presentations. The materials can be displayed on the page either as individual items or bundled together inside folders. One teacher might for instance wish to share a single research document in pdf format; another might have a folder of sample past examination papers for students to download. Most types of files can be uploaded and accessed through Moodle but the student needs to have the correct software to be able to open them.


==Accessing the File Picker==
To add files to a Moodle course, you must first ensure you have the editing turned on.
From Moodle 2.0 onwards, access to the File Picker can be found in many places.  For example in the the Add A Resource menu most options will use it, the [[HTML editor]](add a picture or a link), or by updating any existing file.


==Orientation within the File Picker==
===Drag and drop===
*If you are using a modern browser, you can simply click, hold and drag and drop a file directly onto your course page. You will know if drag and drop is available to you because you will (briefly) see a message at the top of your screen:
[[File:dragdropmessage.png]]


On YouTube, an [http://www.youtube.com/watch?v=d3DeIrip8Co|short animated tour of the File Picker].
To drag and drop a folder, you must first compress/zip it using whichever program your computer has.


In the image below, we have selected the Server Files repository at demo.moodle.org and the English Moodle Features Demo course. Because we have logged in as the teacher, this displays the file structure for the context of the course.
===Add a resource or activity===
*Instead of drag and drop, you can click the link 'Add an activity or resource' and select either [[File]] or [[Folder]] from the activity chooser (or choose from the 'Add a resource' drop down menu, if this is present instead.)


[[File:File picker demo moodle server files.png|thumb|center|300px|Moodle Feature Demo's Server files]]
{|
The major parts shown are:
| [[File:filefolder23.png|thumb|Selecting a file or folder in the activity chooser]]
# The repository column
| [[File:Workingwithfiles.png|thumb|The "Add a resource" drop down menu]]
# The file picker column
|}
# Upload a file repository link - for this [[Context]]
# [[Server files]] - those files you have permission to access
#[[Working with files and folders#Folder structure and paths|Folders]] in System/English/Moodle Features Demo - these contain files
# [[Repositories]] - for example, Dropbox, Google, Flickr, Wikimedia


==Uploading a file==
*The screen for uploading and displaying a file (or folder of files) includes an "add" button. Clicking on this button takes you to the [[File picker]] which is the name given to the file storage and access area within Moodle. Find out more about the places you can upload or add files from in the [[File picker]] page.
*There is also a block (with an arrow) into which you can drag and drop a file straight from your desktop into Moodle.(Note that this  currently doesn't work with Internet Explorer.)


The following instructions explain how to upload and display a single file in a section of your area's front page.
{|
| [[File:newdraganddrop.png|thumb|Area for dragging and dropping files into]]
|}


#Go to the course area where you want the file to be available and Turn Editing On.
==Viewing uploaded files==
#Go to the relevant section on the front page
#Select the Add A Resource menu
#Select File; this loads the Adding A New File To... screen
#Give your file a brief, meaningful name (displays as the text of the link) and a brief description (displays in the index of resources)
#Select the Add button; this loads the File Picker
#From the left column, select Upload A File
#Select the Browse Button; this loads your computer's file management system, allowing you to select the file you need.
#Select the file you need; this returns you to the File Picker.
#Change the remaining settings as appropriate:
##If you want to change the name of the file, enter the new name in the Save As field
##If you want to indicate the author of the file, enter their name in the Author field
##If you want to apply different copyright licence, select it from the Choose License menu
#Then click the Upload This File button; this returns you to the Adding A New File To... screen
#We'll look at the other settings elsewhere; for now, scroll down and click Save And Return To Course
#A link to your file should appear in place.


* Once uploaded, files appear as thumbnails in the file manager for easy recognition.
* Files view can be easily toggled between icons view or a table view with sizes and dates, or a hierarchical list view.


''Tip:'' First it is useful to determine the context for uploading files. For example, in the File Picker window above, we can see that this course has a folder resource called "A directory (folder)".   If you look in the Resource section of Moodle Features Demo, you will see a link called "A directory".  There are also folders with "(file)" in their names and you can find those links in the course as well.  Each course context will create a folder subfolders within the server file structure.
{|
| [[File:truthumbnailsiconsview.png|thumb|File picker icon view]]
| [[File:tableview.png|thumb|File picker table view]]
| [[File:hierarchicallistview.png|thumb|File picker hierarchical list view]]
|}


==Uploading several files at once (a zip file)==
==Editing or updating uploaded files==
The following instructions explain how to upload a compressed (i.e. zipped or archived) folder of files, and display it on your area's front page.


===First, on your computer, create your zip file as follows:===
*Clicking on the  name of an uploaded file opens up a pop up dialogue box which allows file details quickly to be altered.


#Open your file management software (e.g. My Computer or the Finder) and go to the place on your local or networked filespace where your files are stored
{|
#Organise all these files into the folder structure you want to display when you upload
| [[File:popupdialogue.png|thumb|File info popup dialogue]]
#Ensure their file and folder names are meaningful and brief
|}
#Select all the files you want to upload:
##on a PC running Windows, hold down the Ctrl key and click on each file
##on a Mac, hold down the Command (aka Apple) key and click on each file
##on Linux
##if all the files are contiguous, you can click on the top one, hold down the Shift key and click on the bottom one; all the intervening files will then be selected
#Next, bundle them together to make learn.gold treat them as a single file, for the purposes of uploading.
##on a PC, right-click on your selection and choose Send To > Compressed (zipped) folder, or similar
##on a Mac, use Archive or see http://www.apple.com/pro/tips/zip.html
##on Linux
#Note the name of the new zipped folder.


Next, upload your zip file to your Moodle area, unzip, and display, as follows:
==Creating an alias/shortcut==


#Nb your Moodle course area will have a limit on the size of files that can be uploaded. Check this in its Settings and ensure any file you upload does not exceed this (right click or apple-click on a file allows you to see its properties).
*When an uploaded file - or a file from the Private files, Dropbox, File system or EQUELLA repositories - is re-used elsewhere on Moodle, the teacher has the option to make a copy (a new, unconnected version) or to create a shortcut or ''alias''.
#Go to the course area where you want the file to be available and Turn Editing On.
*If an alias is created, then when the original file is updated, it will change in all instances of the alias. So a teacher might add course notes to their private files for example, and then add them into a number of courses. When the teacher makes an alteration in the file in their private files, this alteration will be reflected in all instances of the course notes.
#Go to the relevant section on the front page
*An alias can be recognised by its thumbnail. See the difference in the screenshot below between the original file (left) and the alias (right):
#Select the Add A Resource menu
*To update a file, go to its original location (for example Private files) and upload your new version ''with the same name'' . You will be prompted to override or rename the file. Choose "override" and this file will replace your original file and the alisas/shortcuts will remain and all be updated to your latest version.
#Select Folder; this loads
{|
| [[File:alias.png|thumb|Creating an alias]]
| [[File:shortcut1.png|frame]]
|}


==Displaying existing files in a folder==
===Areas in which aliases cannot be made===


The following instructions explain how to gather together files already uploaded to various different contexts and display them together within a folder on your area's front page.
An alias cannot be made in the following areas of Moodle:


==Folder structure and paths==
* an assignment submission
<includenly>Once a repository has been selected with a click, File picker will show a breadcrumb path with links at the top and any folders or files under it.
* a forum post attachment
* a workshop submission
* a quiz essay
* a database activity file field


In the example below, we were in Moodle Features Demo and as a teacher wanted to add a file resource.  We started in the [[Context]] of the course.   We then drilled down by clicking on the folders until we got to the folder that contained images we used in a [[Lesson]] context.
This is to prevent cases such as a student uploading an item for assessment and then subsequently changing the original in their private files. When a student uses a file from their private files in one of these instances, they do not see the options to "copy" or "create an alias". Below is an example of a file added to an assignment:


[[File:File Picker demo moodle legacy files.png|thumb|400px|center|Using the Server files repository, we drilled down]]
{|
| [[File:aliasassignment.png|thumb|Assignment submission with no option to create an alias]]
|}


If we click on the "English" link in the breadcrumb path, we will see the folders for each course(context) in the English category (context) of courses (this is the first screenshot on this page). <includeonly>
==Site administration settings==
 
An administrator can add new file types and view, edit and delete existing file types from ''Site administration > Server > File types''. This means that, for example, if teachers and students on your site use a lot of files specific to a particular program, such files can now be recognised by Moodle, and, when downloaded, they will open in the correct program, rather than presenting themselves as a generic zip file.
 
[[File:Filetypes1.png|center|thumb|500px||Some examples from the list]]
 
===Adding a new file type===
1. Scroll down to the bottom of the page and click the "Add" button
 
2. Add the details of your file type, using the example below as a guide. This example will add the .mobi extension (for a Kindle ebook) with the standard document icon.
 
[[File:newfiletype.png|thumb|center|500px|Adding a new filetype]]
 
3. Click to save the changes and you will see your new file type has been added to the list:
 
[[File:customfileypesuccess.png|thumb|500px|center|New type in the list]]
 
===Restricting allowed file types===
 
* Allowed file types for [[Workshop]] submissions may be restricted
* It is possible to restrict [[Assignment]] submissions file types in Moodle 3.2.3 onwards
 
===Removing a file type===
*Clicking the X next to a file type will remove it from the site. You will be prompted to confirm before deletion.
 
===Editing an existing file type===
*Clicking the edit icon next to a file type will allow you to change certain details, for example the associated icon and description. If you don't wish to use the default description, you can specify your own custom description (with multi-language tags if your site supports multi-languages) or you can use an alternative language string from mimetypes.php.
===Google docs and docx===
Importing Google docs files as docx.  See https://moodle.org/mod/forum/discuss.php?d=320144
 
==See also==
*HQ Youtube video tutorial: [http://youtu.be/Wt5Hgv-eouE Dragging and dropping files into Moodle]
*HQ Youtube video tutorial: [http://youtu.be/7i2roZ_OCyI Uploading files to Moodle]
*[http://lewiscarr.co.uk/2014/11/moodle-file-sharing-explained/ File sharing explained] blog post by Lewis Carr
*How to share a single file with students: [[File resource]]
*How to share a folder of files with students: [[Folder]]
*Questions about the file picker: [[File picker FAQ]]
* [[Restoring file aliases]]
*[http://www.youtube.com/watch?v=IrOKxYRJvGU How teachers upload files in Moodle 2 video]
*[https://moodle.org/mod/forum/discuss.php?d=332701#p1340373 Powerpoint alternative..for course presentation ] forum thread
 
[[de:Arbeiten mit Dateien und Verzeichnissen]]
[[es:Trabajando con archivos]]
[[fr:Utilisation de fichiers]]

Latest revision as of 01:51, 26 April 2017

Adding files to your course

Moodle provides an easy way for a teacher to present materials to their students. These materials may take the form of files such as word-processed documents or slideshow presentations. The materials can be displayed on the page either as individual items or bundled together inside folders. One teacher might for instance wish to share a single research document in pdf format; another might have a folder of sample past examination papers for students to download. Most types of files can be uploaded and accessed through Moodle but the student needs to have the correct software to be able to open them.

To add files to a Moodle course, you must first ensure you have the editing turned on.

Drag and drop

  • If you are using a modern browser, you can simply click, hold and drag and drop a file directly onto your course page. You will know if drag and drop is available to you because you will (briefly) see a message at the top of your screen:

dragdropmessage.png

To drag and drop a folder, you must first compress/zip it using whichever program your computer has.

Add a resource or activity

  • Instead of drag and drop, you can click the link 'Add an activity or resource' and select either File or Folder from the activity chooser (or choose from the 'Add a resource' drop down menu, if this is present instead.)
Selecting a file or folder in the activity chooser
The "Add a resource" drop down menu
  • The screen for uploading and displaying a file (or folder of files) includes an "add" button. Clicking on this button takes you to the File picker which is the name given to the file storage and access area within Moodle. Find out more about the places you can upload or add files from in the File picker page.
  • There is also a block (with an arrow) into which you can drag and drop a file straight from your desktop into Moodle.(Note that this currently doesn't work with Internet Explorer.)
Area for dragging and dropping files into

Viewing uploaded files

  • Once uploaded, files appear as thumbnails in the file manager for easy recognition.
  • Files view can be easily toggled between icons view or a table view with sizes and dates, or a hierarchical list view.
File picker icon view
File picker table view
File picker hierarchical list view

Editing or updating uploaded files

  • Clicking on the name of an uploaded file opens up a pop up dialogue box which allows file details quickly to be altered.
File info popup dialogue

Creating an alias/shortcut

  • When an uploaded file - or a file from the Private files, Dropbox, File system or EQUELLA repositories - is re-used elsewhere on Moodle, the teacher has the option to make a copy (a new, unconnected version) or to create a shortcut or alias.
  • If an alias is created, then when the original file is updated, it will change in all instances of the alias. So a teacher might add course notes to their private files for example, and then add them into a number of courses. When the teacher makes an alteration in the file in their private files, this alteration will be reflected in all instances of the course notes.
  • An alias can be recognised by its thumbnail. See the difference in the screenshot below between the original file (left) and the alias (right):
  • To update a file, go to its original location (for example Private files) and upload your new version with the same name . You will be prompted to override or rename the file. Choose "override" and this file will replace your original file and the alisas/shortcuts will remain and all be updated to your latest version.
Creating an alias
shortcut1.png

Areas in which aliases cannot be made

An alias cannot be made in the following areas of Moodle:

  • an assignment submission
  • a forum post attachment
  • a workshop submission
  • a quiz essay
  • a database activity file field

This is to prevent cases such as a student uploading an item for assessment and then subsequently changing the original in their private files. When a student uses a file from their private files in one of these instances, they do not see the options to "copy" or "create an alias". Below is an example of a file added to an assignment:

Assignment submission with no option to create an alias

Site administration settings

An administrator can add new file types and view, edit and delete existing file types from Site administration > Server > File types. This means that, for example, if teachers and students on your site use a lot of files specific to a particular program, such files can now be recognised by Moodle, and, when downloaded, they will open in the correct program, rather than presenting themselves as a generic zip file.

Some examples from the list

Adding a new file type

1. Scroll down to the bottom of the page and click the "Add" button

2. Add the details of your file type, using the example below as a guide. This example will add the .mobi extension (for a Kindle ebook) with the standard document icon.

Adding a new filetype

3. Click to save the changes and you will see your new file type has been added to the list:

New type in the list

Restricting allowed file types

  • Allowed file types for Workshop submissions may be restricted
  • It is possible to restrict Assignment submissions file types in Moodle 3.2.3 onwards

Removing a file type

  • Clicking the X next to a file type will remove it from the site. You will be prompted to confirm before deletion.

Editing an existing file type

  • Clicking the edit icon next to a file type will allow you to change certain details, for example the associated icon and description. If you don't wish to use the default description, you can specify your own custom description (with multi-language tags if your site supports multi-languages) or you can use an alternative language string from mimetypes.php.

Google docs and docx

Importing Google docs files as docx. See https://moodle.org/mod/forum/discuss.php?d=320144

See also