Database activity FAQ: Difference between revisions
Helen Foster (talk | contribs) |
Helen Foster (talk | contribs) (How can I have entries waiting for approval highlighted?) |
||
Line 29: | Line 29: | ||
http://moodle.org/mod/data/view.php?d=13&sort=44&order=DESC | http://moodle.org/mod/data/view.php?d=13&sort=44&order=DESC | ||
==How can I list database information horizontally instead of vertically?== | ==How can I list database information horizontally instead of vertically?== | ||
Line 112: | Line 91: | ||
# Add a [[Remote RSS feeds block]] to the course page | # Add a [[Remote RSS feeds block]] to the course page | ||
# Add the database activity RSS feed to it | # Add the database activity RSS feed to it | ||
==How can I have entries waiting for approval highlighted?== | |||
In Moodle 3.0 onwards, any newly created database activities show entries waiting for approval as highlighted for the teacher and the user who added the entry. | |||
For existing database activities, the highlighting can be added by editing the list and/or single template and resetting it, or adding some inline css such as | |||
class="mod-data-default-template ##approvalstatus##" | |||
==See also== | ==See also== |
Revision as of 20:28, 5 November 2015
Where can I download additional database presets?
See the Presets and See also sections in Building Database for various places with presets for download.
How can I add to the list of database presets available for users to choose from?
There is one default preset, Image Gallery. It is possible to create your own presets.
When you have created your database that you desire to set as a preset; go to the "Presets" tab of the database and choose "Save as preset". Give the preset a name and the database fields and templates will now be available as a preset for the rest of the site. You will need site admin rights to do this.
Please see the Database presets for other available presets you can import into your system.
How can I create a database in which students can only view their own entries?
Either:
- Set up the database so that entries require approval. If the entries are never approved, then only the student that added a particular entry and the teachers can view it.
Or:
- Set the group mode of the database to "Separate groups" and assign each student to a separate group.
How can I enable a sort function by clicking on the field headings?
For sorting, you need to manually create the link in the template around that heading. To find the URL you need, you can do a sort using the menus and then look in the URLs. Take out everything but the d, sort and order parameters. For example,
http://moodle.org/mod/data/view.php?d=13&sort=44&order=ASC
http://moodle.org/mod/data/view.php?d=13&sort=44&order=DESC
How can I list database information horizontally instead of vertically?
Can't get columns to line up in list view
- Can't get columns to line up in list view forum discussion including moodle.org presets for download
How can I make an Encyclopedia database preset?
- Encyclopedia database preset forum discussion including encyclopedia-style preset for download
Is there a Time stamp for database entries?
##timeadded##
How can I make the title of an entry into a link?
To make the title of an entry in list view link to the single view, add the following code to the list template:
<a href="##moreurl##">[[Title]]</a>
How can I make email addresses clickable?
To make email addresses clickable, add the following code to the single template:
<a href="mailto:[[Email]]">[[Email]]</a>
where 'Email' is the text field for inputting email addresses.
How can I hide a database entry which was previously approved?
Edit the list and or single template and add the undo approval tag (##disapprove##).
How can I add a default sort order of entries?
In the Fields tab, select a default sort field, choose ascending or descending then click the Save button.
Why is my database so slow to show each page?
Try to go to "Administration > Miscellaneous > XMLDB editor" and choose "Check Indexes". If you have any missing indexes found; upgrade your Moodle to the latest weekly build of your version; re-run the test; backup your site database and then run the suggested SQL from the test on your site database. This should speed up your database activity load times.
How can I prevent students from adding entries?
An override may be used to close/archive a database activity, or have a database in which only teachers can add entries, but students can view the entries.
- Follow the Permissions link in the settings block under Database activity administration
- Remove Student from the capability mod/data:writeentry by clicking the 'X' next to it.
- Click the continue button to confirm.
How can I empty a database / remove records from a database en masse?
In List view, there is a checkbox next to each entry. Click to select the ones you wish to delete and then click the 'Delete selected' button. Alternatively, click the 'Select all' and 'Delete all' buttons. A warning message will appear asking you to confirm what you wish to delete.
I get an error message when importing a csv of entries
One thing to try is to open up the csv file in Excel and save it again as a csv file - with another name - and then try importing it agin. Sometimes this just works :)
How do I export/import picture fields from a database activity from one course to another?
You cannot export/import database entries with picture fields using the csv option, you will need to use Moodle's backup and restore functionality. Please note that you will need to backup and restore the database activity with user data in order for the entries to be carried over.
How can I show recently added entries in a block on the course page?
- Enable an RSS feed of recently added entries as described in Using Database
- Add a Remote RSS feeds block to the course page
- Add the database activity RSS feed to it
How can I have entries waiting for approval highlighted?
In Moodle 3.0 onwards, any newly created database activities show entries waiting for approval as highlighted for the teacher and the user who added the entry.
For existing database activities, the highlighting can be added by editing the list and/or single template and resetting it, or adding some inline css such as
class="mod-data-default-template ##approvalstatus##"
See also
Using Moodle forum discussions:
- New preset, please review, and make suggestions! including FAQ preset for download
- Design a Database Preset for Document Sharing including preset for download
- Look of the database module
- For those who want the display of Moodle Site's Modules and plugins
- Looking for some stellar examples of Moodle courses including book reviews preset for download
- Database 2.7 List and Single View: Possible to view only entered fields?