The database activity allows participants to build, display and search a database of entries about any topic. This activity is a powerful and versatile tool which can be used for contact, absence and extension request forms, for image galleries, collecting project resources, generating timesheets and recording contact hours or time spent on CPD, and even as a support tool to capture help requests for a moodle help desk. This video is an excellent introduction to some of these.
Add a database activity
1. To add a database activity, turn editing on, click on the 'Add an activity or resource' link in the section or topic where you want it to appear.
2. Choose 'database' from the list of activities and resources.
Set the name and description
Defining the settings for the entries gives the options to substnatially change the way that participants engage with the database and the learning outcomes.
If set to "yes", the entry will only be visible to everyone once it has been checked and approved.
Allow editing of approved entries
If 'approval required' is set to yes, then the editor / teacher can choose whether approved entries can still be edited once approved or if they are then locked.
Allow comments on entries
Allows participants to comment on each others database entries.
Entries required before viewing
Require participants to add 1 or more entries to the database before they can see what other participants have added.
Maximum numbers of entries
Restrict the total number of entries. Combining this with the previous option can help constrain and encourage students to add a specific number of items.
Grade to pass and ratings
These settings are optional, and collapsed by default.
- NB Ratings 'aggregate type' must be set to something other than 'No ratings' before grade to pass can be used.
- Here you can set a passing grade for the database. This may be connected with Activity completion and Conditional activities such that a student will not be able to access a follow up activity until they have achieved the required grade in the database.
- Database entries can be rated using a scale. By default, only teachers can rate database entries. This is a useful tool for giving students participation grades.
- The total grade that a participant can achieve cannot exceed the maximum grade set here.
Setting up the database activity
In the steps below we will create a very simple database to capture information about books - the author, cover art, link to an online source. We will also cover the additional fields for Comments and Ratings that students and teachers can use to extend the use of the database activity.
1. Define database fields
There are multiple field types and these can be added multiple times if required.
Add a text input (single line) field
Add a picture field and set the size for the different views (list and single)
Add a menu (drop down selection list) field
Add a URL field
For more information on the full list of fields available see Field types.
Rather than having to create a new database from scratch, the database activity module has a presets feature. You can create your own presets and share them with other Moodle users, import existing presets from zip files or from presets stored in Moodle.
The Activity Examples course on the School demo site has a number of database activities with presets for download.
3. Add a database template
Moodle.org has a page dedicated to understanding database templates that we recommend if you wish to delve into this more deeply.
- Created by default from the fields added. This can be altered by adding / removing fields.
- All available tags are listed on the left.
As with the single view template, this automatically adds the fields created earlier. In list view, an extra field is added by default, 'delcheck', which adds a checkbox at the top left of each entry to make it easier to perform mass delete functions on the database entries.
Use this template to change the input page under 'Add entry'. Fields added to this databse are available and displayed by default.
It is possible to add HTML to templates and the CSS template allows you to further specify a specific visual style e.g. by adding a class to one of the fields such as Author in the HTML view, this can be used to target a particular style e.g. 'color' to that specific item on only that template e.g.
HTML code for the 'Add entry' template:
<td class="authorName template-field cell c0" style=""><b>Author:</b> </td>
CSS entry under CSS template:
4. Adding an entry
If (during database set up) 'Approval required' has been set to 'Yes' then an editor / teacher will approve entries by clicking on the tick icon.
5. Viewing the database
Step through the entries, one by one, using the numbers or .
Scroll down through the full list of entries.
Comment on entries
Add your comment and click 'save comment'. This will only available on single view.
If rating is enabled, the editor / teacher can rate entries to give the participant who added this a 'score' towards their grade for this activity.
The 'search' page, like the templates, is automatically generated to include the fields added that have been used when adding entries - in the image below, for example, the drop down list against 'Genre' lists only those genres that have entries linked to them. The design of this page can also be changed via the templates section under 'Advanced search template'.
For more guidance on the database activity, please see:
- Introduction to managing course participants
- Make your course visible to students
- Enrolment methods and managing access permissions
- Enrol participants using Warwick auto-enrolment
- Manually enrol participants onto a Moodle space
- Roles and their functions in Moodle
- Groups and groupings
- Enable activity completion
- Mark activity completion manually
- Track activity completion
- Course completion
- Course participation
- Introduction to assessment and feedback
- Create a fail / pass scale
- Create a custom certificate
- Create and manage badges
- Reports, logs and completion data in Moodle
- Create an assignment
- Create an assignment for group submission
- Set up Turnitin within an assignment
- Create and grade a submission using a rubric
- Use a marking workflow for assignments
- Blind marking
- Allocate markers to specific submissions
- Provide grades and feedback for individual assignments
- Check the status of submissions
- Hide or show grades and feedback
- Introduction to eStream
- Access your eStream content
- Uploading videos to eStream
- Edit videos in eStream
- Edit video thumbnail
- Uploading a closed captions (subtitles) file to eStream
- Add eStream videos to Mahara
- Sharing eStream videos to Moodle
- Sharing an eStream video with a link
- Setup a video assignment in Moodle