Quick Screencast of the Database Module Setup

Quick Screencast of the Database Module Setup

Dennis Daniels -
回帖数:4
http://video.google.com/videoplay?docid=3565975285187619449
You can see the rest of the moodle training vids here:
http://video.google.com/videosearch?q=moodle

Hope it helps someone out there!

As well, could someone verify if this is a true bug?
http://moodle.org/bugs/bug.php?op=show&bugid=5718&pos=0

thanks
Dennis
回复Dennis Daniels

Re: Quick Screencast of the Database Module Setup

Chris Fry -

Dennis ....

I was looking over your video on the Database module and was curious .... how would I create a data base listing similar to that of the http://moodle.org/mod/data/view.php?id=6009

thank you

回复Chris Fry

Re: Quick Screencast of the Database Module Setup

David Scotson -

I'm assuming you mean a list view that has each entry as a seperate row in a table.

For the list view you have three areas for templates

  • header
  • repeated entry
  • footer

You need to create the table and the header row in the first area, then the repeated table row, then close the table like this:

header

 <table class="generaltable" width="80%">
 <tr>
 <th>test</th>
 <th>testing</th>
 <th>tester</th>
 <th>actions</th>
 </tr>

repeated entry

 <tr>
 <td>test</td>
 <td>testing</td>
 <td>tester</td>
 <td>##Edit##  ##More## ##moreurl## ##Delete##  ##Approve## ##user## ##comments## </td>
 </tr>

footer

 </table>

Depending on your theme you may need to add an appropriate class="something" to your table tag in the HTML and possibly add relevant CSS to your theme files.

回复David Scotson

Re: Quick Screencast of the Database Module Setup

Chris Fry -

Thank you for the information... the DB feature is great and I think that it has some potential.....

Can you take a look at the enclosed image and tell me why the filds look like this....? Not from the list view but from the add a new entry screen.

回复Chris Fry

Re: Quick Screencast of the Database Module Setup

David Scotson -

I'd guess you've added new fields after the intial creation of the database. Try looking at the add entry template, hitting the reset template button and then saving. It should create something simple but effective, and for the entry screen at least you'll rarely want to do anything more complicated than what the default provides.