calendar/lib: calendar_set_filters() use pre-fetched context and course recs
commit37875ac5b748b5ddfd208860f2d9aed45de6c68a
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:53:33 +0000 (19 07:53 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:53:33 +0000 (19 07:53 +0000)
treed09cb107d556ce7c125e3961285fa41ff17beb98
parent853a093ec5cf2fd9c215c4064fd80ae0bbe2af73
calendar/lib: calendar_set_filters() use pre-fetched context and course recs

Showing the calendar block was causing 2 DB queries per course the
user is enrolled in. Instead, use the data available in the array that
is passed as a parameter, and spare the DB a ton of needless traffic.

Fixes MDL-11221 Calendar not using context stuff from get_my_courses

Author: Martin Dougiamas
calendar/lib.php