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

Assignment feedback notification emails being sent from the admin user



    • Affected Branches:


      We have had reports from several students that they have received emails from the Moodle admin user saying that they have left feedback for an assignment submission only to find that there is no feedback.

      Replication steps

      1. Log in as a teacher and create an assignment in a course. Enable file submissions.
      2. Log in as a student and submit a file to that assignment.
      3. Log in as an admin and wait for the scheduled task “Prepare submissions for annotation” (\assignfeedback_editpdf\task\convert_submissions) to next run.
      4. Log in as the teacher again and then do one of the following
        1. If the assignment settings has “Use marking workflow” = yes…
          Go to “View all submissions”, select the student that has submitted the assignment and with selected choose “Set marking workflow state” and Go. On the next page select “Released” and yes for notify students. Save changes. Do not add a grade or feedback before doing this.
        2. If the assignment settings has “Use marking workflow” = no…
          Go to “View all submissions”, click “Grade” for the student that has submitted the assignment. Without putting in a grade or any feedback ensure “Notify students” is ticked save changes.
      5. Check inbox for student, email will say Admin User has given feedback for assignment xyz.

      It appears that the most likely occurrence of this happening is when a teacher releases grades (when using marking workflow) for a whole course when some assignments have yet to be graded. When the student receives the email they go to Moodle to see their feedback; find out there is no feedback and then contact the admin user directly by replying to the automated email. This is frustrating for both the student and the admin.

      This issue appears to be related to MDL-60685

      Having looked at what is happening I can confirm the following…

      • When the scheduled task “Prepare submissions for annotation” runs it gets all the assignments that need converting from the db table assignfeedback_editpdf_queue. These recent submissions are unlikely to be graded at this point. The conversion needs to know the id field from table assign_grades so a record is created for each submission. The assign_grades table holds a field for grader but as this is running as a scheduled task the user id for the admin is entered here.
      • When the workflow status is changed to “released” the assign_user_flags record is updated for each submission, workflowstate field is set to “released” and mailed field is set to 0. More importantly the grader field in assign_grades is not updated (still admin). This is expected as the user who changes the work flow state does not have to be the person who graded the assignment.
      • When the cron method in the assign class runs (assign/locallib.php) it looks for assignment notifications to send out. The conditions for this include mailed = 0 and workflowstate = released.

      Initial solution ideas…

      1. When the scheduled task “Prepare submissions for annotation” creates new assign_grades records it sets the grader field to 0 or -1. Then update SQL in assign/locallib.php – cron to exclude these so notifications are not sent. Also fixes MDL-60685 with additional interface updates to ignore grader = 0 or -1
      2. Add extra rules in assign/locallib.php – cron so that notifications are only sent if a grade or feedback exists. Once a grade and/or feedback is entered the grade field will have been updated from admin user.
      3. Restrict the work flow state so that a grade and/or feedback must be present for it to be updated. Note, this does not fix the occurrence of this issue when “Use marking workflow” is no.
      4. When scheduled task “Prepare submissions for annotation” (\assignfeedback_editpdf\task\convert_submissions) runs find a way to convert the submission files without the need to create the assign_grades record.




            • Assignee:
              jsi22 John Illsley
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            • Votes:
              6 Vote for this issue
              3 Start watching this issue


              • Created: