mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-14617 removed get_group_teachers code
This commit is contained in:
parent
bcd0603fbd
commit
6e28edc532
@ -579,31 +579,6 @@ function get_group_students($groupids, $sort='ul.timeaccess DESC') {
|
||||
return get_users_by_capability($context, 'moodle/legacy:student', 'u.*, ul.timeaccess as lastaccess', $sort, '','',$groupids, '', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns list of all the teachers who can access a group
|
||||
*
|
||||
* @uses $CFG
|
||||
* @param int $courseid The course in question.
|
||||
* @param int $groupid The group in question.
|
||||
* @return object
|
||||
*/
|
||||
function get_group_teachers($courseid, $groupid) {
|
||||
/// Returns a list of all the teachers who can access a group
|
||||
if ($teachers = get_course_teachers($courseid)) {
|
||||
foreach ($teachers as $key => $teacher) {
|
||||
if ($teacher->editall) { // These can access anything
|
||||
continue;
|
||||
}
|
||||
if (($teacher->authority > 0) and groups_is_member($groupid, $teacher->id)) { // Specific group teachers
|
||||
continue;
|
||||
}
|
||||
unset($teachers[$key]);
|
||||
}
|
||||
}
|
||||
return $teachers;
|
||||
}
|
||||
|
||||
|
||||
|
||||
########### FROM weblib.php ##########################################################################
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user