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