MDL-38147 Performance improvements to coursecat class:
authorMarina Glancy <marina@moodle.com>
Wed, 27 Feb 2013 00:35:35 +0000 (11:35 +1100)
committerMarina Glancy <marina@moodle.com>
Mon, 25 Mar 2013 02:23:14 +0000 (13:23 +1100)
commit15d50fffd8d23696334fb9f7a1fb12896eae1ce6
tree61fd04b80823ce1667f72234030717fac93971ec
parente1d54562ce1bef3fd25d3f229579318b53d924bb
MDL-38147 Performance improvements to coursecat class:

- Retrieve and cache only often-used fields of course category
- Removed function coursecat::get_all_visible() as potentially causing performance issues
- removed function coursecat::get_all_parents() as ineffective and unnecessary, replaced with get_parents()
- retrieve all fields from course_categories when unretrieved field is accessed

Also some code improvements:
- rename functions starting with _ , rename arguments, etc.
lib/coursecatlib.php
lib/db/caches.php
lib/tests/coursecatlib_test.php