]> git.mjollnir.org Git - moodle.git/commit
datalib: Introducing get_courses_wmanagers() for print_courses() usage
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:26:42 +0000 (07:26 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:26:42 +0000 (07:26 +0000)
commit70f158789ef5c0c636c8d3902ab7c0639c95a38b
treefeb18cc4ef89c7d7728b315a7e743c378cb72aea
parent431cad0d62c3429a294a4588d9b0c79b3ed90521
datalib: Introducing get_courses_wmanagers() for print_courses() usage

For an efficient print_courses() we need to grab in a constant number
of queries...

 - course data
 - "course manager" role assignments
 - user records for the coursemanagers' fullname()

So here we do it in 2 DB queries. The 2nd one (grabbing RAs and user
records) can be expensive if we are dealing with a large number of
courses.

Which we shouldn't - When the number of courses is large the course
listing doesn't come this way anyway...
lib/datalib.php