Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb41db9
)
MDL-53566 tool_monitor: Fix context preload
author
Andrew Nicols
<andrew@nicols.co.uk>
Tue, 13 Nov 2018 13:15:10 +0000
(21:15 +0800)
committer
Andrew Nicols
<andrew@nicols.co.uk>
Tue, 13 Nov 2018 13:17:40 +0000
(21:17 +0800)
admin/tool/monitor/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/admin/tool/monitor/lib.php
b/admin/tool/monitor/lib.php
index
c7493ad
..
58078ec
100644
(file)
--- a/
admin/tool/monitor/lib.php
+++ b/
admin/tool/monitor/lib.php
@@
-125,7
+125,15
@@
function tool_monitor_get_user_courses() {
$options[0] = get_string('site');
}
- $fields = 'fullname, visible, ctxid, ctxpath, ctxdepth, ctxlevel, ctxinstance';
+ $fieldlist = array_merge(
+ [
+ 'fullname',
+ 'visible',
+ ],
+ array_values(context_helper::get_preload_record_columns('c'))
+ );
+
+ $fields = implode(', ', $fieldlist);
if ($courses = get_user_capability_course('tool/monitor:subscribe', null, true, $fields, $orderby)) {
foreach ($courses as $course) {
context_helper::preload_from_record($course);