I'm using Moodle for some websites. However, I recognized that I have to modify many parts of Moodle to suit my needs. Therefore, it would be great if the core design of Moodle, as well as a more detailed document on the functionality of the files is avalable. I thought that such information should be there, since Moodle is a mature open source project; however I did not find it in the installation pack as well as from the Internet. Could you please tell me where to get it? Or if you are experienced in modifying Moodle, could you please help me with some questions?
Thank you very much!
It might help if you went ahead and asked the questions!
Some defaults for course configuration and that sort of thing are in config.php.
config-dist.php is very helpful because it actually illustrates some of the different options you can set up. I think you should look at that first.
If you are installing blocks or other functions that are discussed in the forums, people will specify which file it is and what you need to change (with the blocks, look at the readme files). Things I have changed: shortname field length, course max summaries increased, default layout for blocks in course formats, allowing admins to continue to edit posts after the editing window is past, disabling the "loginas" feature. Many of those were in config.php, some in course/lib.php, etc. Some changes also require fiddling with the database tables. Most of that was in the forums; people contributed the knowhow, and I can follow directions!
Sometimes, you can just find the page you want to change (for example, a form) and the filename will be in the URL. Go chase it down.
Language files are extremely important if you want to change the words displayed in particular places. But remember that the strings may be used different places, depending on if the language file is used by a lot of pages or only one or two. moodle.php is one of those. You might get surprised where some of those strings are displayed!
Good luck! It takes time to learn a system this complex, but you can certainly do it.
Try to stay away from the core-engine of Moodle when you make your changes:
- do not change modules
- stay away from the gradebook
- leave especially quiz and questions untouched (but in 1.6 you can create your own question plugin according the rules)
- create your own blocks, there is a great document for how to do that
- you can hack the frontpage easily, if you study the case mechanism before
- study and modify the course formats
- change the colors of CSS (mind the 5 types of colorblinds) but be more carefull when changing the fonts and the layout, again with 508 in Mind: look how your changes sound in the Jaws browser or look in the (old) Lynx browser
- study the new data module: hardly any wish with moderate complexity can be fulfilled with that: to give you an impression, the plugin pages with their tabs and different views are built with that..
..and if you have a question when visiting a page (any page) then click on the Moodle Docs for this page link on the bottom of every page..
Could you please explain a little bit more about point 5? What the frontpage has to do with case mechanism? Thanks a lot!
In the settings of your moodle you can decide how the frontpage will look like. If you want to have - for example - the CMSplugin working on your frontpage, you add this as a case in the set of case/switches in ../index.php:
- case strval(FRONTPAGENEWS):
- case FRONTPAGECOURSELIST:
- case FRONTPAGECATEGORYNAMES:
- case FRONTPAGETOPICONLY:
- case FRONTPAGECMS:
Above, under and inside of each case of this case-switch-mechanism you can add/remove code & images as you wish (to have the look and feel of moodle.org you can add legends and fieldsets in the stylesheets of the cases of the frontpage..)
At first, there are two things I would like to do:
1. Make the cookies never expire so that the users don't need to login every time they visit my site.
2. Create a number of block, one block for each course in my site which contains: a. All topics in the course, b. 3 most recently updated topics, c. 3 "hottest" topics, where hostest topics are defined as ones whose forum is most recently updated.
Could you please help me with these? Thank you very much!
- What will happen if a visitor visits your website from an internet cafe and the cookie will never expire?
- there are several blocks which almost do what you wish: combine the content of these blocks and add an "only for this course filter"