Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,19 @@


/**
* Returns a list of teachers by group
* for sending email alerts to teachers
* Returns a list of teachers can would be listed on the certificate.
*
* @param stdClass $certificate
* @param stdClass $user
* @param stdClass $course
* @param stdClass $cm
* @return array the teacher array
* @return array the teacher array organised by group
*/
function certificate_get_teachers($certificate, $user, $course, $cm) {
global $USER;

$context = context_module::instance($cm->id);
$potteachers = get_users_by_capability($context, 'mod/certificate:manage',
$potteachers = get_users_by_capability($context, 'mod/certificate:printteacher',
'', '', '', '', '', '', false, false);
if (empty($potteachers)) {
return array();
Expand Down