#171 Only get teachers who are enrolled within the course
This commit is contained in:
parent
9f2a36d983
commit
26ea75479f
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ class element extends \mod_customcert\element {
|
|||
$teachers = array();
|
||||
|
||||
// Now return all users who can manage the customcert in this context.
|
||||
if ($users = get_users_by_capability($PAGE->context, 'mod/customcert:manage')) {
|
||||
if ($users = get_enrolled_users($PAGE->context, 'mod/customcert:manage')) {
|
||||
foreach ($users as $user) {
|
||||
$teachers[$user->id] = fullname($user);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue