-
Book Overview & Buying
-
Table Of Contents
Moodle 1.9 Extension Development
The lib.php file stores all of the basic functions used by the other files in the module. Most of the functions required by Moodle are included by the NEWMODULE template. Many of the functions defined in the template will work for activity Foo! without any changes. In this section, we will cover just the modifications necessary to make our activity function. This is also a good location in which to put our own additional functions. We might add functions, either for re-usability or for code clarity. An example of this is the foo_grade function, which will be covered at the end of this section. Note that you can optimize your code performance by placing these additional functions into the locallib.php file instead of lib.php. This improves performance because core Moodle functions will include the module's lib.php file, but they won't need the locally added functions. The Moodle core programming guidelines state that it is only necessary to create a separate file if you make...
Change the font size
Change margin width
Change background colour