mirror of
https://github.com/moodle/moodle.git
synced 2025-03-18 14:40:06 +01:00
MDL-47316 mod_forum: Fix course overview performance
make more efficient use of mod_info cache by processing courses sequentially. Change-Id: I03b808c8a7efc42879ec2689fbd2a9fe7a8f1103
This commit is contained in:
parent
272fec367f
commit
81ba2632ed
@ -1459,7 +1459,8 @@ function forum_print_overview($courses,&$htmlarray) {
|
||||
.'JOIN {forum_posts} p ON p.discussion = d.id '
|
||||
."WHERE ($coursessql) "
|
||||
.'AND p.userid != ? '
|
||||
.'GROUP BY d.id, d.forum, d.course, d.groupid';
|
||||
.'GROUP BY d.id, d.forum, d.course, d.groupid '
|
||||
.'ORDER BY d.course, d.forum';
|
||||
|
||||
// Avoid warnings.
|
||||
if (!$discussions = $DB->get_records_sql($sql, $params)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user