MDL-41191 enrol: fix use of deprecated function
authorDan Poltawski <dan@moodle.com>
Wed, 14 Aug 2013 09:30:00 +0000 (17:30 +0800)
committerDan Poltawski <dan@moodle.com>
Thu, 15 Aug 2013 03:50:08 +0000 (11:50 +0800)
lib/enrollib.php

index d3a878e..a9741f9 100644 (file)
@@ -298,7 +298,7 @@ function enrol_get_shared_courses($user1, $user2, $preloadcontexts = false, $che
     } else {
         $courses = $DB->get_records_sql($sql, $params);
         if ($preloadcontexts) {
-            array_map('context_instance_preload', $courses);
+            array_map('context_helper::preload_from_record', $courses);
         }
         return $courses;
     }