Index: moodle/mod/lamslesson/lib.php =================================================================== RCS file: /usr/local/cvsroot/moodle/mod/lamslesson/lib.php,v diff -u -r1.22 -r1.23 --- moodle/mod/lamslesson/lib.php 14 Jan 2016 21:01:49 -0000 1.22 +++ moodle/mod/lamslesson/lib.php 16 Feb 2017 03:29:27 -0000 1.23 @@ -769,7 +769,7 @@ } // we are looking for all users assigned in this context or higher - if ($usercontexts = get_parent_contexts($context)) { + if ($usercontexts = $context->get_parent_context_ids($context)) { $listofcontexts = '('.implode(',', $usercontexts).')'; } else { $sitecontext = get_context_instance(CONTEXT_SYSTEM);