The database activity module allows the teacher and/or students to build, display and search a bank of record entries about any conceivable topic. The format and structure of these entries can be almost unlimited, including images, files, URLs, numbers and text amongst other things.

Following are instructions to add database activity module in a course:

1. Navigate to the course you want to add a certificate to.

2. Click the Turn Editing on button on the right side of the screen

3. Click Add an activity or resource

4. Check Certificate radio button, then click Add

5. Give your database a Name, Description, select your options, and click the "Save and display" button at the bottom of the page.

Define the fields or use a preset.

Define fields: A field is a named unit of information. Each entry in a database activity module can have multiple fields of multiple types e.g. a text field called 'favorite color' which allows you to type in your favorite shade, or a menu called 'state' that lets you choose one from a list of the 50 that make up the United States of America. By combining several fields with appropriate names and types you should be able to capture all the relevant information about the items in your database. Note that if you later edit the fields in the databases you must use the Reset template button, or manually edit the template, to ensure the new fields are added to the display.

Use preset:


  1. Define the templates.
  2. Add one or two same entries then edit the templates as appropriate.
  3. Entries settings:
    a. Approval required: If set to "yes", the entry will only be visible once a teacher has checked and approved it.
    b. Allow comments on entries: If set to "yes", users will be able to comment on database entries.
    c. Entries required for completion: Select here how many entries you wish the student to add before the activity can be considered "complete".
    d. Entries required for viewing: Select here how many entries you wish the student to add before they are allowed to see entries by other people. Note: If entries are required before viewing, the database auto-linking filter should be disabled. This is because the database auto-linking filter can't determine whether a user has submitted the required number of entries.
    e. Maximum number of entries: Select here the maximum number of entries you wish students to make.
  4. General settings:
    a. Available from/to: Select here when you want the database to be visible to students.
    b. Read only from/to: Select here the dates you want students to be able to see entries in the database but not be able to add their own.
    c. Grade to pass: 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.
    d. RSS: This setting is collapsed by default and only visible if RSS has been enabled on the site and for the database. Select the number of entries you wish to appear in the RSS feed here.
    e. Grade: Choose the category in which this database will appear if ratings are enabled.
    f. Roles with permissions to rate: Database entries can be rated using a scale. By default, only teachers can rate database entries, though students can be given permission to do so if desired from Administration > Database administration. This is a useful tool for giving students participation grades. Any ratings given are recorded in the gradebook.


    g. Restrict access/Activity completion: These settings are visible if Conditional activities and Activity completion have been enabled in the site and the course.
    h. Site administration settings: Database activity defaults and additional settings may changed by an administrator in Administration > Site administration > Plugins > Activity modules > Database.
  5. Adding Field: The name is what is shown when an entry is added. It must be unique and short. The description helps to identify that field.
    If you need to ensure one or several particular fields are always completed, then tick the box 'Required field' when setting up the fields for your database. The field(s) will display a red asterisk when students contribute to the database, and they will not be able to save their work until they have entered the relevant information. A new column will show the teacher which fields are required and not.
    Types of field: Checkbox, date, file, latlong, menu, multimenu, number, picture, radio button, text area, text input, url etc.


  6. Adding Presets: To avoid the necessity of always having to create a new database from scratch, the database activity module has a presets feature. An image gallery preset is currently included in the database module to help get you started. You can create your own presets as well and share them with others.



  7. Importing a preset:
    a. On the database page, click the Presets tab.
    b. The usual way to import a preset is clicking the "Choose file" button and browsing to the ZIP file containing the preset (eg. "") stored on the server. If there does not yet exist a preset ZIP file on the server, upload it from your local machine. Choose the desired preset file by clicking on its action "Choose". Finally, press the "Import" button.
    c. Alternatively, you can choose a previously loaded preset.
    d. After the import, you can start to add or import entries. All the hard work of setting up the fields and templates has been done for you. If you desire, you can still customize the fields and templates.
  8. Exporting a preset: If you wish to share your database presets with others, you have two options:
    a. Export as a ZIP file, which can then be imported to another course or Moodle site.
    b. Save as a preset, which publishes the database for other teachers on your site to use. It will then appear in the preset list. (You can delete it from the list at any time.)
  9. Database Templates: Templates for the Database activity module allows to control the visual layout of information when listing, viewing or editing database entries. It is a similar to the technique used to mail merge letters in word processors such as Open Office Writer or Microsoft Word.
  10. Template Tag usage: The content of each field you create for your database and some special tags (listed below) can be inserted into the output template by the use of tags.
    Fields have the format [[fieldname]]. All other tags have the format ##sometag##. To use the tags in the box on the left of the page, first click to Disable the editor and then place your cursor in the text area of your target edit and click on the tag you want to place. When you have finished, click to save the template. Alternatively, you may simply type the appropriate name within the required symbols like ##this## or [[this]], respectively.
    a. ##edit## creates a clickable icon link that allows you to edit the current entry (only appears if you have the rights to do this)
    b. ##delete## creates a link that lets you delete the current entry (only appears if you have the rights to do this)
    c. ##approve## create a link that lets you approve the current database entry (only appears if you have the rights to do this)
    d. ##more## creates a link to the single view, which may contain more detailed info
    e. ##moreurl## creates just the URL for the above link, useful for creating your own links. You can click on the link icon and type ##moreurl## into URL field or in source view type <a href="##moreurl##">[[fieldname]]</a>
    f. ##comments## creates a link to the view/edit comments page, the link text is the current number of comments (only appears if comments are turned on)
    g. ##user## creates a link to the user page of the user who submitted the entry, link text is their name
    h. ##timeadded##
    i. ##timemodified##
    j. ##userpicture## displays the user picture in List view
  11. Template types:
    a. List template: This template allows you to control the fields used and their layout when viewing multiple entries at once (e.g. search results). It is possible that this view may simply provide an overview with more detailed information available by clicking on an entry to access the single view of the entry.
    b. Single template: This is used to display a single entry at a time and so has more space for display and can use, for example, larger versions of images or optionally provide more information than shown in the list view.
    c. Advanced search template: An advanced search template is for creating the interface form used in the advanced search.
    d. Add template: This template creates the interface form used when adding or editing database entries.
    e. RSS template: Lets you control the content of the RSS feed for database entries.
    f. CSS template: If any of the HTML in your other templates requires CSS to provide visual style you can specify it here.
    g. Javascript template: You can use javascript to manipulate the way elements are displayed in either the List, Single or Add templates. Basically you need to enclose the part you want to manipulate in some named html element. The naming is essential as it allows you to identify the element for manipulation.
    h. Reset templates button: When you first create a database the templates will be pre-filled with appropriate HTML. If you later add fields then you can press the reset templates button and it will add HTML for the new fields in a similar fashion. If you have edited any of the templates in the meantime then your changes will be lost. It is recommended that you finalize the database fields before changing the template code.
  12. View list: The list view shows multiple entries, possibly in a more abbreviated form to ensure all the information fits. You may use the controls at the bottom of the screen to search and sort the contents.
    a. View single: one item at a time
    b. View list : several items at a time (number is user defined)
    c. Add entry: add an item to the database
    d. Search: search the entries
  13. Views options:
    a. View single: Alternatively, you may view only one entry at a time. This might allow you to view more detailed information than the list view.
    b. Add comment: If comments have been enabled, you may add a comment.
    c. Rate entries: If ratings have been enabled, and made view-able, by the database editor, you may grade other database entries, and view these ratings.
    d. Adding an entry: Go to the "Add entry" tab and fill in the form.
    e. Deleting multiple entries: In List view, a checkbox will appear next to each entry. Select the entries you wish to delete and click the 'Delete selected' button. Alternatively, click the 'Select all' and the 'Delete all' buttons to delete all entries. A warning message will appear asking you to verify what you wish to delete.
    f. Automatically linking database entries: If the Database auto-linking filter is enabled, any entries in a database will be automatically linked to where the concept words and/or phrases appear within the same course. This includes forum postings, internal resources, week summaries etc.
    g. Approving and undoing approval of entries: If, during database set up, 'Approval required' was set to 'Yes' then a teacher can approve an entry by clicking on the tick/checkmark icon. Once an entry has been approved, it is possible to undo the approval by clicking the circle with a line through it icon.
    h. Importing many entries: You can import entries via a CSV file if you click the "Import entries" link under 'Database activity administration' in the Administration block of your course. CSV means Comma-Separated-Values and is a common format for text interchange.
    i. Exporting entries: You can export entries either in CSV (comma separated values) or ODS (OpenOffice Calc) formats by clicking the tab at the top or by clicking the "Export entries" link under 'Database activity administration' in the Administration block in your course. (Both CSV and ODS formats can be opened with MS Excel.)
    j. Enabling an RSS feed of recently added entries: To enable an RSS feed from a database activity, an administrator must first enable RSS feeds for database activities across the whole site as described in RSS feeds settings. A section called 'RSS' will then appear on the edit settings page of the database activity.
    k. Exporting to an external portfolio: If an external portfolio such as Mahara has been enabled by the administrator then users have the option to export individual entries to that portfolio. They will see at the bottom of a database entry an "export" icon to click on and select the portfolio to export to.

-Virtual Slate Version 1.0