OK, I know I'm supposed to be writing a paper but I couldn't resist Moodling a little. After all it is still Sunday here and I'm entitled to a little recreation Here's a possible patch ... I still wonder if Moodle HQ should have a chat about coding style via skype.
All variables should be initialised or at least tested for existence using isset() or empty() before they are used.
For me, that indicates a preference for initializing all variables at the beginning. I think this simple initialization is a good place for comments (if needed about the variable) and it will ultimately keep the code simpler since we will not need to check for the existence of the variable before using it. I'm not sure if this issue was previously discussed amongst the developers. If it has, then I don't want to waste time re-hashing it but as we move toward 2.0 it may be an ideal to strive toward. Any thoughts (am I just being obsessive)? Peace - Anthony