-
New Feature
-
Resolution: Fixed
-
Minor
-
1.9
-
None
-
MOODLE_19_STABLE
-
MOODLE_19_STABLE
In order to implement MDL-648 (see http://docs.moodle.org/en/Development:How_to_create_a_patch for a spec), we need to get users who:
a) are in group $studentgroup and have capability mod/quiz:emailnotifysubmission in the context of a particular quiz, or
b) are in any groups, and have capabilities mod/quiz:emailnotifysubmission and moodle/site:accessallgroups in the context of a particular quiz.
You could do that with three calls to get_users_by_capability, then combine the results in PHP.
Alternatively, you could change get_users_by_capability to optionally do the "in group $groups, or in any group and has moodle/site:accessallgroups". The attached patch does that.
I have no idea what effect the attached patch will have on performance (when $useviewallgroups is false, when it is true, things will certainly be slower).
The patch applies to Moodle 1.8 or HEAD.
- blocks
-
MDL-648 Send notification to teacher every time a student completes a quiz
-
- Closed
-