A part of the consultancy I that do with organisations, I run specialised workshops on different areas of Moodle. Today I will be running a workshop on Moodle file management, so I went through the process of setting up Dropbox as an example repository for external file storage.

As I have seen some misunderstanding of how this works before online, I thought it would be good to do a quick post on it. But as I did not have time to write a quick post, so here is a long one instead – apologies for the misuse of quote ;)

Dropbox and Moodle Workshop Demo.

So for the workshop I had to set up three new Dropbox users.

  1. A user for the institution
  2. A user – Paul Jones who will be the student in the Moodle course
  3. A user – james Smith who will be the teacher in Moodle.

The institution account is for registering the Moodle site so that users in Moodle can avail of Dropbox integration.

The teacher account is for adding some teaching/course files into Dropbox

The student account is for adding his own files into Dropbox.

Institution account

Firstly I created the institution account

Then I registered at Dropbox for API key  https://www.dropbox.com/developers/apply

I clicked on Create an APP and filled in the form

  • Called it LTS MOODLE
  • Added a Name, and Description
  • Selected Full Dropbox as the option (This is important and the Moodle docs say to do so)

Dropbox Create App

Once that was done, it gave me the details for the connection (API key and secret) as below:

Dropbox APP Details

To enable testing with users I Clicked on Enable App with up to 5 users:

dropbox-edit-settings-additional-users

You cannot apply for production status without having users linked successfully to the Dropbox account.

Teacher account

I created a teacher account under the name James Smith and added 4 word documents into his Dropbox account as below:

moodle-teacher-dropbox-files

Student Account

I created a student account under the name Paul Jones and added 2 images into his Dropbox Photos account as below

moodle-student-dropbox-files

So with the Dropbox accounts created and working, on with the show..

Moodle stuff

So as Admin within my Moodle 2.3.2 site, I had a number of tasks to do

a) enable and configure the Dropbox repository
b) create the new users in Moodle which I used the user upload csv option
c) create a new course area and put in James as Teacher and Paul as student

Within Moodle I first enabled the Dropbox repository.

This was in the settings Under  Site Administration -> Plugins -> Repositories -> Manage Repositories

I then configured the Dropbox API setup in the repositories plugin area using the API key and Dropbox secret that I had created earlier.

moodle-repository-api-setup

I also set the cache size to 0 – (zero) so all files would be cached regardless of size. Files are only temporarily cached on Moodle.

I then created the CSV to upload the users using the minimum of user information just username,password,email,firstname,lastname

And lastly, I created the course and added James as teacher and Paul as a student.

So that was the basic preparation out of the way.

Demo Info

So for the demo itself, I then logged out of everything, dropbox, Moodle etc to clear the cache and have no active logins on any site.

For the purpose of the demo I used Google Chrome as the student and Firefox (my preference) as the teacher. I find this is always a good approach when doing testing of courses using one browser for each role.

Teacher within Moodle

So I logged in as the teacher on Firefox and accessed the course.  I had two tasks to do, firstly to create an assignment and then to add a file from Dropbox.

So I enabled editing and created an assignment for the user to upload a file.

I then wanted to add in the Terms and Conditions file that I had in the Dropbox of James.

I selected Add File on the activity Chooser

Gave it a Name and Description that will appear on the Moodle course page

Then under the Content area I clicked on the Add button to launch the file picker. The file picker allows you to choose files from whichever sources are enabled including in this case Dropbox.

As I am not logged in to the Dropbox on the web, it prompts me to log in:

moodle-file-picker-dropbox-login-request

I clicked on login and it brought up a window for me to log in, so I logged in with the James Account.

It then prompted me to allow the Moodle site to connect to my Dropbox.#

moodle-file-picker-dropbox-app-request

So to proceed I clicked Allow.

Moments later I could see my Dropbox in the File Picker, and the four files I had uploaded earlier including my terms and conditions file.

I clicked on the terms and conditions file to select it and was prompted to make an important decision:

moodle-file-picker-dropbox-link-to-file

The important point was this:

  • if I wanted to make a copy of it to add it into Moodle
  • or just to create an alias/shortcut to the file which would leave the original in Dropbox and just link to it so that when people accessed it, it would take the Dropbox file. This means that the Dropbox based file can be updated and the link in Moodle will update itself once the cache expired.

I selected Create an Alias and clicked on Select this file.

Back in the Add file page, I selected Force Download as the Display option and saved and returned to course. I always recommend the force download option for files so the user will not have the experience of the browser embedding which can sometimes be off-putting.

So that was that with the teacher account, assignment created and a file linked from Dropbox.

Over to the student.

Student within Moodle

I logged in as the student on Google Chrome and accessed the course. First thing I did was click on the Terms and Conditions file.

It immediately downloaded the file for me, without prompting as Chrome does. I opened it and it was fine. So although the file was stored in the teachers Dropbox and linked into Moodle, the student did not require a Dropbox login to view the file.

Then I went on to the assignment. It was a photo assignment and asked for the student to upload a file.

moodle-student-assignment

I knew that I had a photo in the student Dropbox account, so I clicked on Add to launch the file picker.

I then selected Dropbox as a source for the file and it prompted me to log in.

I logged in as the student account I had created earlier.

It then prompted me to confirm I wanted to link the Moodle site to the account. So I clicked Allow.

I then was shown my Dropbox account. I knew i had placed the photos in the Photos folder, so I clicked on it

moodle-student-assignment-dropbox-files

I saw my two pickers so I selected the smaller one and it prompted me to confirm.

I clicked on Select this file, and it added the file into my Moodle assignment for me.

I clicked on Save changes, and that was it done.

Summary

So what can you take from this walk-through?

Dropbox has a good but strict usage policy which requires any application or website that wants to connect to it, to

  • Apply for a developer API
  • Actually do some testing
  • Finally apply for production status.

They key aspect is here that Moodle when installed on your website is Your Application, so you need to go through the process.

This is required whatever the application is. It is not difficult and not even very time-consuming for the testing phase. The whole test above took less than twenty minutes although I do not know how long it takes for production approval.

Teachers can use Dropbox as a source for their files, and either link to them so that the can just update the file in Dropbox but others can access without even knowing it is in Dropbox, or take a copy of the file into Moodle.

Students can use Dropbox to store their files until they need to add into Moodle for their work.

So all in all it is pretty straight forward and simple enough to use.

If you have any questions on this, feel free to add a comment below!

23 Comments for this entry

  • One question that popped up and sorry for my naivety (only in testing stage of dropbox myself). You say Students can access the drop box? do they get to see every file in the drop box? or get allocated just one folder to upload their work too?

    I have a large site and don’t want 20,000+ students seeing other learners work (plagiarism crossing my mind).

  • ghenrick says:

    Hi Claire,

    Good question!

    They access their own dropbox using their own account.

    They do not access a shared one.

  • ghenrick says:

    No you won’t have to do that.

    Once the repository API is configured in moodle for the institution account, then any user who can access the File Picker can “login” to their own dropbox.

    So they would either have a pre-existing account on Dropbox for themselves, or they would just create an account on dropbox (be sure to have the referrer for that extra space Hmmm!)

  • Ross Manson says:

    The app for 5 users, Gavin. Does that mean I am limited to 5 Moodle students? Sorry if this is a dumb question – I’m not yet a Dropbox user.

    Thanks

  • Larry Lippke says:

    Do I need to be concerned with the amount of storage available for the institutional dropbox? Or, are the physical files stored within the teachers’ accounts and then just shared with the institutional account?

  • ghenrick says:

    Quick Update, the approval for production status took less than 1 day – impressive.

  • Chad Leaman says:

    Gavin, I really appreciate this article. It is very important to “Selected Full Dropbox” when creating your app, as it will not work otherwise, and you can’t change your app – have to delete and restart process.

    Thanks so much, more helpful than the documentation on Moodle. A tip of the hat!

  • simon heissler says:

    thanks! followed your guide – the only problem was that neither the student or the teacher got prompted from dropbox if it was ok to connect to moodle. the dropbox files opened directly in a seperate pop-up. The only one who got the message (and got the dropbox file in the file picker was the admin person)..
    Something if done wrong?

    • ghenrick says:

      Hi Simon,

      Were you sure to be using different browsers for each role? Otherwise you need to be clearing cache/sessions etc on main one to be sure ot be logged out of everything.

    • Peter Kupfer says:

      You have to click the blue button that says up to 5 users can test before the other people will see the Dropbox link button. We hit the same issue, then after I clicked that link on the drop box page, to start the testing, it worked. It now lists the other teacher who linked their account.

      Does that make sense?

  • Peter Kupfer says:

    First of all, thanks for this post, it is going to save me a lot of time.

    Second, I am having some trouble with seeing the updates I make in Dropbox on the Moodle site. When you see the cache needs to clear what do you mean? I had a teacher link (create an alias) to a file on her Moodle page. Then we went and updated the word document and click on the link in Moodle and the change wasn’t reflected.

    We then cleared her browser cache and tried again and no change. I then walked over to my laptop and clicked on the same link and it was till the original file? Is there just a time lag?

    Thanks,
    Peter

  • Peter says:

    I don’t know what it means to reload with “File picker.”

  • Mitchell says:

    I am having a problem using drag and drop to move files from Dropbox to Moodle. Editing is turned on, but when I drag the file into Moodle and release the mouse, the file opens instead of being put into Moodle.

  • Irfan says:

    when i click to dropbox(BMSS Knowlwdge Repository) in file pickup panel,
    First it prompts me to login, after login shows following:

    1.BMSS Knowledge Repository would like limited access to save information in your Dropbox.

    After Allowing this shows following error in file pickup:

    2.Remote repository returned error: App is not allowed to access this API.

  • Julia says:

    Hi,
    What do I do if I want students to work in groups and see a file they are each uploading how do I set group access to separate shared drop-box folders for 5 people?

  • Julia says:

    Gavin,
    Im trying to add dropbox in our moodle site for student group work is this possible?
    Also I’ve gone through the process but am unable to link to 5 users to test as that option is not available to me. Where should it be please.

    Many thanks in advance for any answer

    Julia

1 Trackback or Pingback for this entry

Leave a Reply

Your email address will not be published. Required fields are marked *

Performance Optimization WordPress Plugins by W3 EDGE