Can I Export "file upload" entries?

Can I Export "file upload" entries?

by Gemma Dempster -
Number of replies: 8

Hello!

I have created a "Resources Database" within our Moodle 2.1.2 to use as a file repository that students can upload and share resources related to their course.

However, potentially I would like to "export" all entries including the files, e.g. create a zip file.

When I go to export all entries it provides this screen with the greyed out prompt "File Field cannot be exported"

Has anyone come across this issue before? Or found a resolution?

Thank you!

Average of ratings: -
In reply to Gemma Dempster

Re: Can I Export "file upload" entries?

by Itamar Tzadok -

In the standard module this cannot be done with the standard export feature which exports only to plain text.

The standard module does support portfolios which should allow you to export rich content, that is, an html file as a manifest to embedded files. I haven't explored this feature in this module thoroughly so it may or may not work for your purpose.

The dataform plugin (which is an enhancement of the standard module) supports all kinds of export, including export of file fields into a downloadable zip file (which is basically what you need). This feature is not released yet but should be soon.

hth smile

Average of ratings: Useful (1)
In reply to Itamar Tzadok

Re: Can I Export "file upload" entries?

by Gemma Dempster -

Hi Itamar,

I thought as much. We do have a Mahara 1.4 portfolio which does support the export of all entries.

Unfortunately, the output is a discussion/journal; thread:

 

The "file upload" entries are then formatted embedded or as attachments to each post - not the ideal export really!

Thanks for posting about your Dataform Plugin - it looks a lot more user friendly than the current database module, I will keep an eye on the next update.

Thanks again.

Gemma

In reply to Itamar Tzadok

Re: Can I Export "file upload" entries?

by Zabelle Motte -
Picture of Particularly helpful Moodlers

Hello,

We have been testing the database nd the dataform modules.

The dataform is much more complicated only to have file export.

The database activity is actually easy to use but only the possibility to expot files is missing.

Kisses.


Zabelle

In reply to Zabelle Motte

Re: Can I Export "file upload" entries?

by William Lu -
Picture of Particularly helpful Moodlers

Hi Zabelle,

I am not sue what you want to get from the 'Export'.

Moodle Database 'Export' tab is for exporting to Spreadsheet only, in case some bosses who don't bother to view Data entries in your carefully designed templates, but only want to view in boring Excel rows.

If you do want to 'Export' your Database to XLS, here is the work-around. 

1. Add an URL field to your Database templates, name it something like: 'Link to file'

2. Ask your students to upload a file into File field, leave the URL field empty.

3. Teach your student to 'Right-click' over the uploaded file and 'Copy link/address...', after their File is uploaded.

4. Ask your student to 'Edit' their entry again, and Paste the file URL into URL field.

Then, in your exported XLS file, the URL will be listed in a column, your bosses should be able to click it to get the file to their PC, provide they are enrolled into your course already.

---------------------------------------------------------------------------------

If you just want to 'Export' everything in your Database, you can simply Backup your Database (Database activity administration > Backup), tick all boxes, and restore it in a new course. 

---------------------------------------------------------------------------------

If your students want to 'Export' their entry for their portfolio, then follow this:




In reply to William Lu

Re: Can I Export "file upload" entries?

by Zabelle Motte -
Picture of Particularly helpful Moodlers

Hello Wiliam,

There is no problem for us to get datas from the text fields of the database activity. We wrote a tutorial on how to open cvs files with Microsoft Excell (>Data >External data > Import a texte file).

The problem is to have an archive of uploaded files, when a file field is used in the database activity. A lot of professors use the database to make special assigments, for example to get the assignment title or to get the students orientation. But they still ask the student to submit a file. At the end of the year, they want to reset the course for a new students cohort to follow it. But they have to make a backup of all datas before. With the csv export, they get all text data, but they also want to get a backup of file assignment. For the moment, we use the activity backup, that puts the files in the "files" folder, but  this folder is not easy to decompress (since mbz archives are tar.gz) and also contains students photos.

It would be great to have a checkbox in the export database tab, with the possibility to have a zip archive of all submitted files.

Thanks for your interest.

Kisses

Zabelle

In reply to William Lu

Re: Can I Export "file upload" entries?

by Sarah Vaughn -

This is a great way to download information, from William LU,  but what version are you using, I have Moodle 2.9 and I can download the HTML, but I can't find the zip package with files? 

Do you know what the back end database is being used to store the database activity information in Moodle?

thanks

In reply to Sarah Vaughn

Re: Can I Export "file upload" entries?

by William Lu -
Picture of Particularly helpful Moodlers

Hi Sarah,

I think the 'export to portfolio' feature started from Moodle2.0.

Please follow the screenshots (was taken in Moodle2.6) in my previous reply and make sure:

  1. You have added a file field (or a Picture field)  in your templates and you have uploaded a files and/or an image
  2. You have added the ##export## tag in your templates.
  3. Click on this icon: Export to portfolio
  4. Select 'HTML with attachments' > Next > Confirm
  5. Check your PC's Download folder or Desktop and looking for a zip file with this name: 'portfolio-export.zip'
  6. Unzip the zip file and you will have 1 html file and 1 'site-files' folder, with files and images in it.
  7. I've tested above steps in Moodle2.7, 2.9 and 3.0.
Do you know what the back end database is being used to store the database activity information in Moodle?

I don't know. I believe there must be many tables. Honestly, I never need check it.