Well, today I've been working on how to make 'foo' blocks and modules.
Making blocks has been quite easy because in moodle wiki there is a very well explained page about how to make blocks for Moodle: link to the page. I upload the block I've programmed so anyone can see 'in life' the progress:
As you can see, making a block in Moodle it's very easy. But making modules... it's rather harder than blocks. There isn't documentation as good as blocks, and the template they give you it's a bit confusing, specially for the database managing.
While trying to learn how can I program a foo module, I think I've learnt accidentally how I can manage databases in Moodle. For the module, I need to create a database table in one of the files of module, but I don't know where and how... I expect that the following libraries I've found will be useful to me:
In the lib folder of Moodle, there is 2 libraries: ddllib.php and dmllib.php. The first one contains functions to alter the main structure of the database (create and alter tables, for instance). The second one is used to access data (like inserting new rows, retrieve values, delete values, etc).
Let's follow working on it... I've not finished yet :)