Students are unable to submit attachments to collaborative group submission assignments using TII
Description
When a student tries to submit an attachment to an assignment set to collaborative submissions, released to specific groups and sending submissions to TII, they will receive the following message:
You have successfully saved your work but NOT submitted yet. To complete submission, you must select the Submit button.
However, there is no submit button presented on the page, and the attachments are not saved and effectively removed. There is a permission exception stack trace generated in the logs when this happens. Please see screenshots and stack trace attached.
Steps to reproduce:
split class into groups
create an assignment
set to inline and attachments
set to collaborative submissions
set to release to groups
set to send submissions to TII
submit as a student from one of the groups
attach any file and submit
notice error message, attachments removed and no submit button
submit again, only inline content
submission goes through successfully
This cannot be reproduced in an assignment using the exact same settings, but minus sending submissions to TII.
This appears to be a regression from the work done in TII-226, where the intention was to ensure the user submitting 'owns' the attachments. However, when implementing this collaborative submissions were overlooked.
I tracked this down to a little piece of code that over-writes the 'submitterId' value of the submission object from the group ID the user belongs to, to the individual user's ID. This then breaks a permission check later on, because the ID is now pointing to a user rather than a group.
Adding conditionals to only perform this over-writing of the submitterId value when the assignment is set to not use collaborative submissions solves the issue.
When a student tries to submit an attachment to an assignment set to collaborative submissions, released to specific groups and sending submissions to TII, they will receive the following message:
However, there is no submit button presented on the page, and the attachments are not saved and effectively removed. There is a permission exception stack trace generated in the logs when this happens. Please see screenshots and stack trace attached.
Steps to reproduce:
split class into groups
create an assignment
set to inline and attachments
set to collaborative submissions
set to release to groups
set to send submissions to TII
submit as a student from one of the groups
attach any file and submit
notice error message, attachments removed and no submit button
submit again, only inline content
submission goes through successfully
This cannot be reproduced in an assignment using the exact same settings, but minus sending submissions to TII.
This appears to be a regression from the work done in TII-226, where the intention was to ensure the user submitting 'owns' the attachments. However, when implementing this collaborative submissions were overlooked.