]> git.mjollnir.org Git - moodle.git/commit
course/index: minor context-related fixes
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:27:31 +0000 (07:27 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:27:31 +0000 (07:27 +0000)
commitdfbf98cdb35ceec3a9de60b37bb62fcab1ca19df
tree3ff849fe9b87d7ad2a9dca4dd23363edea7ded26
parent40fb8aa69ab25afd018300467db3c8c3f216c90c
course/index: minor context-related fixes

 - The code uses the system context a lot. Declare
   $sysctx at the top and use it.

 - If the category has a context property, use it
   (saves 1 DB query per category displayed)

The DB costs of this page in editing mode are

 - ~100 DB queries for fix_course_sortorder()

 - ~50 DB queries for the categories listing

If we rewrite both to lose the recursion, we could resolve the
page in perhaps 5 DBq.
course/index.php