|
|
I know the gradebook was probably written first, but the JavaScript really needs to be updated to match http://docs.moodle.org/en/Development:JavaScript_guidelines. In particular
1. Putting Moodle code in the YAHOO namespace seems evil to me.
2. Almost all the code should be in external JS files not in the HTML, there seems to be a lot of JS in grade/report/grader/index.php
3. Related to that, the JS should be includable from the page footer, but becuase of the inline script, it isn't. See the todo on lnie 119 of grade/report/grader/index.php.
I was hoping you could fix these problems more easily than me, so assigning to you Nico, I hope that is OK.
|
|
Description
|
I know the gradebook was probably written first, but the JavaScript really needs to be updated to match http://docs.moodle.org/en/Development:JavaScript_guidelines. In particular
1. Putting Moodle code in the YAHOO namespace seems evil to me.
2. Almost all the code should be in external JS files not in the HTML, there seems to be a lot of JS in grade/report/grader/index.php
3. Related to that, the JS should be includable from the page footer, but becuase of the inline script, it isn't. See the todo on lnie 119 of grade/report/grader/index.php.
I was hoping you could fix these problems more easily than me, so assigning to you Nico, I hope that is OK. |
Show » |
|
Is this (or will it soon be) an overall coding guideline type of thing? I've been adding more YAHOO namespaced stuff and also was about to start for my own projects. It seemed to be a good idea as the YAHOO.namespace() function checks for collisions and acts as a nice substitute for using globals.
Should I avoid this?