-
Bug
-
Resolution: Not a bug
-
Minor
-
None
-
3.1.10
-
MOODLE_31_STABLE
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
- Log in as a teacher and create an assignment in a course. Enable file submissions.
- Log in as a student and submit a file to that assignment.
- Log in as an admin and wait for the scheduled task “Prepare submissions for annotation” (\assignfeedback_editpdf\task\convert_submissions) to next run.
- Log in as the teacher again and then do one of the following
- 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. - 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.
- If the assignment settings has “Use marking workflow” = yes…
- 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…
- 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-60685with additional interface updates to ignore grader = 0 or -1 - 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.
- 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.
- 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.