]> git.mjollnir.org Git - moodle.git/commit
calendar: performance optimisations + behaviour fix (MDL-7416 MDL-9617)
authormartinlanghoff <martinlanghoff>
Sun, 6 May 2007 04:28:11 +0000 (04:28 +0000)
committermartinlanghoff <martinlanghoff>
Sun, 6 May 2007 04:28:11 +0000 (04:28 +0000)
commit37d87d11f963dfcd3ffcd5f56e5af4fca08eab0e
tree1d88cc750ec1f32b186d6f187cf1867950b130ce
parentf261e052f2363d5d5bcb885452af366a38456298
calendar: performance optimisations + behaviour fix (MDL-7416 MDL-9617)

With 2500 courses the calendar was causing around 15000 queries at login and 5000 on the home page.

- Replaced queries inside loops with single unlooped queries.
- Fixed calendar so that course events will show when the users role is assigned at a category level.
- Moved calendar_session_vars() function call out of calendar/lib.php (including a lib should not have side effects)

Author: Matt Clarkson - with some conflict resolution from MartinL
blocks/calendar_month/block_calendar_month.php
blocks/calendar_upcoming/block_calendar_upcoming.php
calendar/event.php
calendar/export.php
calendar/lib.php
calendar/preferences.php
calendar/set.php
calendar/view.php