If you have not already found it, the main source of developer documentation is http://docs.moodle.org/en/Development:Developer_documentation
For finding where to start, you need to know that when you are looking at, for example, http://moodle.org/mod/forum/discuss.php?d=82799
, then the code for that is in /mod/forum/discuss.php, and you just need to follow through what it does.
It call functions in the main Moodle libraries, and the three most important are:
lib/moodlelib.php - general stuff.
lib/weblib.php - things to do with output of HTML
lib/dmllib.php - things to do with getting data in and out of the database
As you look at the code, it is often a good idea, to insert statements like
debugging('In function require_login');
The second of these will print out a variable, showing you what it contains. Variable like $course are often objects with lots of fields. Seeing what they contain will help you understand what is going on. The first of these prints out whatever text you give it, and information about the sequence of function calls that the code took to get there. (It only work if you go to Admin -> Server
-> Debugging, and turn the debug level to ALL or DEVELOPER.
Finally, it is helpful to have an editor that lets you jump around the code. For example, I like Eclipse, and if I hold down CTRL and click on the name of a function, it immediately jumps me to where that function if defined. Most good editors (including Emacs and vi/Vim) can do this. (http://docs.moodle.org/en/Development:Setting_up_Eclipse
Edit: I thought this post was sufficently useful to be worth saving, so I put it here: http://docs.moodle.org/en/Development:Finding_your_way_into_the_Moodle_code