Skip to content

Commit

Permalink
Merge branch 'MDL-69704-master' of git://github.com/sarjona/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Oct 5, 2020
2 parents 79e1ab9 + 64fbd34 commit cc7c3b3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions course/classes/local/service/content_item_service.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,12 @@ private function get_content_favourites(string $prefix, \context_user $userconte
// Add any subplugins to the list of item types.
$subplugins = $pluginmanager->get_subplugins_of_plugin('mod_' . $plugin->name);
foreach ($subplugins as $subpluginname => $subplugininfo) {
if (component_callback_exists($subpluginname, 'get_course_content_items')) {
$itemtypes[] = $prefix . $subpluginname;
try {
if (component_callback_exists($subpluginname, 'get_course_content_items')) {
$itemtypes[] = $prefix . $subpluginname;
}
} catch (\moodle_exception $e) {
debugging('Cannot get_course_content_items: ' . $e->getMessage(), DEBUG_DEVELOPER);
}
}
}
Expand Down

0 comments on commit cc7c3b3

Please sign in to comment.