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

Quiz: notification message for students after questions have been manually graded

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.7.11, 2.8.9, 2.9.3, 3.0, 3.1, 3.2, 3.11.3
    • 4.0
    • Quiz
    • MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_311_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_400_STABLE
    • MDL-52456-master
    • Hide

      Pre-condition:

      • There is an existing quiz that contains questions at least one essay question.
      • Admin configs the "Delay to notify graded attempts" for Quiz in admin settings(The default value is 5 hours, set the notifyattemptgradeddelay value via Site administration > Plugins > Activity modules > Quiz > General settings. Now we set 1 minute too easy to test.)
      • The site config can send an email and the email of the student is a valid email.
      • The student has the mod/quiz:emailnotifyattemptgraded capability.
      • There is an existing Quiz that has at least one essay question on the site.
      1. The student attempts the quiz and submits the attempt
      2. Teacher grade the attempt which contain essay question.
      3. After 1 minute:
      • Admin goes to the log page via Website administration --> Reports --> Log.
        Observe the log file of Quiz attempt notify manually graded => The Quiz attempt manual grading complete event should exist,
        Ex: The attempt with id '65' for the user with id '3' for the quiz with course module id '33' is now fully graded. Sending notification.
      • The student has been received the email with the template:

      The email template:
      Email subject: Your attempt at [Quiz Name] has been graded
      Email body:
      Hi [Forename Surname],

      Your answers to '[Quiz name]' in course ''[Course name]' at '[Time]' have now been graded.

      You will be able to view your score and any additional feedback by revisiting [Quiz url] and reviewing your attempt.

       

      Show
      Pre-condition: There is an existing quiz that contains questions at least one essay question. Admin configs the "Delay to notify graded attempts" for Quiz in admin settings(The default value is 5 hours, set the notifyattemptgradeddelay value via Site administration > Plugins > Activity modules > Quiz > General settings. Now we set 1 minute too easy to test.) The site config can send an email and the email of the student is a valid email. The student has the mod/quiz:emailnotifyattemptgraded capability. There is an existing Quiz  that has at least one essay question on the site. The student attempts the quiz and submits the attempt Teacher grade the attempt which contain essay question. After 1 minute: Admin  goes to the log page via Website administration --> Reports --> Log. Observe the log file of Quiz attempt notify manually graded => The Quiz attempt manual grading complete  event should exist, Ex: The attempt with id '65' for the user with id '3' for the quiz with course module id '33' is now fully graded. Sending notification. The student has been received the email with the template: The email template: Email subject: Your attempt at [Quiz Name] has been graded Email body: Hi  [Forename Surname] , Your answers to ' [Quiz name] ' in course '' [Course name] ' at ' [Time] ' have now been graded. You will be able to view your score and any additional feedback by revisiting [Quiz url] and reviewing your attempt.  

    Description

      There is no feature to send a notification to a student when the teacher graded an essay question in a quiz.
      In quiz module are two permissions that send mails to teacher when a student submits an attempt and to student for confirmation that the attempt is finished.


      Added later: here is how we plan to implement this:

      So, revised implementation plan:

      1. Create a new capability mod/quiz:emailnotifyattemptgraded given to no archetypes by default.
      2. Create a new quiz message type for this message.
      3. Add a new mod_quiz admin setting "Delay to notifiy graded attempts" mod_quiz/notifyattemptgradeddelay. Default value 5 hours.
      4. Add a new column gradednotificationsenttime to the quiz_attempts table, to store the timestamp when the 'graded' notification was sent.
      5. Change the quiz process_finish method, so that if there are no manually graded questions, or if the student does not have the capability, then set gradednotificationsenttime to the submit time (because there are no notifications to send) otherwise set it to null.
      6. Create a new scheduled task which, finds quiz attempts with
        • state = 'finished'
        • AND gradednotificationsenttime IS NULL
        • AND sumgrades IS NOT NULL
        • AND timemodified < now - mod_quiz/notifyattemptgradeddelay
        • ORDER BY timemodified DESC (so we process most recently modified attempts first)
      7. For each of those attempts
        • Check $attemptobj->get_display_options(true)->manualcomment. If this is question_display_options::HIDDEN then don't send the message now (but we will keep trying, in case this changes in future.) Otherise:
        • send the message
        • and set gradednotificationsenttime to now.
        • Log that the message was sent.

      At least in this first implementation, we will only ever send one automatic email for each quiz attempt. (If, later, a grade is changed, and the teacher wants to notify the student, they will need to send the message manually. This will be rare, handling it automatically is out-of-scope of this initial development.)

      Attachments

        Issue Links

          Activity

            People

              jbthong Thong Bui
              ralfh Ralf Hilgenstock
              Tim Hunt Tim Hunt
              Ilya Tregubov Ilya Tregubov
              Angelia Dela Cruz Angelia Dela Cruz
              Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              57 Vote for this issue
              Watchers:
              47 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h