Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70375

Option to send quiz notifications only for failing grades (and fix settings UX consistency with mod_assign)



    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9.3, 3.10
    • Fix Version/s: None
    • Component/s: Quiz, UX
    • Labels:
    • Affected Branches:


      We would like an option to send quiz notifications to teachers only when the student got a failing grade. (This is only relevant for quizzes where a passing grade is set.)

      However, currently this is not an easy option to add, because in the quiz, the only control over notifications are the capabilities:

      • mod/quiz:emailconfirmsubmission - you need to override the permissions and allow this permission for students, for students to get a confirmation message when they submit their attempt.
      • mod/quiz:emailwarnoverdue - similar but a bit different.
      • mod/quiz:emailnotifysubmission - users (teachers) with this capability get an email when a student (in their group) submits a quiz.

      In contrast, the Assignment activity implements this in a better way:

      So, there are clear settings on the settings form to control whether this quiz send notifications. There is no longer a need for a 'student' capability, because the more fundamental capability mod/assign:submit covers it. To determint which 'teachers' should get an email notification, there is a capability mod/assign:receivegradernotifications.

      For quiz, on the settings form, this could look like:


      Send a confirmation message to students when they submit [ No / Yes ]

      Notify students when an attempt becomes overdue with a grace period [ No / Yes ]

      (This one is conditional on the 'When time expires' setting)

      Notify teacher when a student submits an attempt [ No / All attempts / Attempts with a failing grade ]

      (This one would need validation so you can only select the last option if a grade to pass is set.)

      As part of this, we would get rid on the mod/quiz:emailconfirmsubmission and mod/quiz:emailwarnoverdue capabilties. This will require some clever upgrade code, to correctly set the new options based on the previous roles setup, to ensure that the behaviour of every quiz is preserved.

      Similarly, mod/quiz:emailnotifysubmission capability would be given to teacher (and non-editing teacher?) by default, with the quiz settings changed to preserve existing behaviour for each quiz.




            Unassigned Unassigned
            timhunt Tim Hunt
            Component watchers:
            Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Huong Nguyen, Barbara Ramiro, Bas Brands, Mathew May
            1 Vote for this issue
            1 Start watching this issue