Moodle 3.0, 3.2: Reuse the Structure of a Database
Applies to: Moodle 3.0, 3.2
A database in Moodle allows an instructor and students to build, display and search a bank of record entries about any topic.
You can export the structure and formatting of a database so it can be reused in a different site or elsewhere in the same site. You can easily share this exported database file with colleagues for use in their sites.
Note: An exported database file will not save any student data that is in the database activity.
Exporting a database structure for reuse
- Go to the course site that contains the pre-existing database.
- Find the Database you want to reuse and click the Database link.
- Click the Presets tab.
- Click Export. A file downloads to your computer. The file name includes the name of your database in Moodle and ends with .zip.
Importing a database structure
Note: Do NOT import a database structure into a database that already contains student data. It is very likely you will lose student data in the process. It is good practice to start the import with a completely new database.
- Go to the course homepage where you want the new database.
- Add a new database if you have not already done so.
- Click Turn editing on.
- Click Add an activity or resource in the section where you want to add the Database.
- Select Database and click Add.
- Enter a Name for the database.
- Enter a Description, including instructions for how your students should use the database. You may include information about the kinds of data you want to collect. You can edit this description later if you need to.
- Modify additional settings as desired. Some core database settings include the following:
- Entries: require instructor approval for each entry before other students can view it, allow students to make comments on each others’ entries, and/or set minimum or maximum number of entries an individual student can post.
- Availability: define a period of time students have access to add entries to the database, and/or a period of time when students can view the database but not add any more entries.
- Click Save and display.
- In the Database, click the Presets tab.
- Scroll down to the Import section.
- Click Choose a file… and follow the instructions to find and upload your zipped database file.
- Click Import.
- Scroll down and click Continue. A confirmation message saying the preset has been successfully applied displays.
- Test your database and make modifications if needed.