Help and Support (Staff)

This is one of many help and support pages that are available about the University of Nottingham's Moodle online learning environment. If you have any questions or queries concerning Moodle then contact information is at the bottom of this one-page sheet. Please browse or use the SEARCH box below.

Go to Moodle

Skip to end of metadata
Go to start of metadata

Moodle Help & Support 

This refers to Moodle 2.7 from July 2015 onward

How to export database entries for import into another Moodle database

If you use the normal "Import" (in the Administration block, click on Module administration > Import) then the structure of activities comes across but not the content, because content is user-generated (by the students as well as staff) and the same students aren't normally enrolled in the destination module. No student or other user data comes across - it's an empty database, but with the fields and templates set up as in the previous module.  Even your own teacher-contributed content does not come over.

If you do want to carry over content that was created in a  database, you can if you wish export this data and import it into the new course as a starter for or information for next year's students.

Note that image fields cannot be exported with databases and glossaries into another module.

Exporting entries

You can export entries either in CSV (comma separated values) or ODS (OpenOffice Calc) formats by clicking the Export tab at the top of the database or by clicking the "Export entries" link in the Database Activity administration block. (Both CSV and ODS formats can be opened with MS Excel.)

  1. Click into the database you wish to clone.
  2. In the Administration block click Export entries  (or click the Export tab within the database)
  3. If your database does NOT have commas in the text, leave the default as a CSV file with comma delimiter.  If you have commas within the text in the database (which is usual!) then use ODS OR CSV with a tab delimiter (or colon if you are sure there are none of those in the text). 
  4. Select which fields from the database you wish to have exported. By default, all fields are checked to be included.
    Note: image fields cannot be exported.
  5. Click on Export entries. The file will download.     You will have the option of either opening or saving the file.
  6. Save the file on your computer (it will still have the file extension csv)

Importing entries

You can import entries via a CSV file if you click the "Import entries" link in the Database activity administration block. CSV means Comma-Separated-Values and is a common format for text interchange.  You can create your own csv file: in this case the expected file format is a plain text file with a list of field names as the first record. The data then follows, one record per line. Records should be delimited by new lines (usually generated by pressing RETURN or ENTER in your text editor). Tabs can be specified using \t and newlines by \n.

Alternatively you can import a file exported from another Moodle database, e.g., in a previous year's module.

The database into which you would like to import the entries needs to be set up with the correct fields in advance.

In the database to which you would like to import entries:

  1. In the Administration block click Import entries  (alternatively you may set up a brand new database and import entries at the point where you add fields)
  2. Select the correct delimiter (\t if you have selected Tab as described in the step above)
  3. Upload the file from your computer using the file picker (or by drag and drop)
  4. Click Submit
  5. After upload page import.php comes back blank if it failed. If successful you'll read a message like, "1 entries saved".

 

Similar tutorials

The following other resources are also relevant to this topic:


Queries, comments or questions?

Please contact your local elearning support team.


Phone: (0115 95) 16677
or email: itservicedesk@nottingham.ac.uk


Phone: (0574) 8818 0000 (ext. 8915)

or email: e-learning-support@nottingham.edu.cn


Phone: (03) 8924 81 99
or email: itservicedesk@nottingham.edu.my

Incorrect?

If you have any comments on how you think this help can be improved then please email Learning-Technologies@nottingham.ac.uk