-
Bug
-
Resolution: Fixed
-
Major
-
1.7.2
-
None
-
MOODLE_17_STABLE
-
MOODLE_18_STABLE
Group separated assignments don't notify teachers of students' uploads. This problem comes from deprecatedlib, which is not role-aware. I suggest this new get_group_teachers function (of course, I tested and it worked).
function get_group_teachers_new( $courseid, $groupid) {
if ( $teachers = get_course_teachers( $courseid)) {
foreach ( $teachers as $key => $teacher) {
if ( ( has_capability( 'mod/assignment:grade',get_context_instance( CONTEXT_COURSE, $courseid),$teacher->id)) and ismember( $groupid, $teacher->id))
unset( $teachers[$key]);
}
}
return $teachers;
}