Moodle
  1. Moodle
  2. MDL-35963

Possible to submit an empty file picker to Assigment and have it count as submission

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.1, 2.3.2
    • Fix Version/s: 2.3.4
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide
      1. Create an assignment that accepts online text submissions (and nothing else)
      2. Login as a student and attempt to submit empty text ('')
      3. Check that you receive a notification that "Nothing was submitted" and the submission is not accepted.
      4. Enter some text and save the submission
      5. The submission should be saved
      1. Create an assignment that accepts file submissions (and nothing else)
      2. Login as a student and attempt to submit without uploading any files
      3. Check that you receive a notification that "Nothing was submitted" and the submission is not accepted.
      4. Upload a file and save the submission
      5. The submission should be saved
      1. Create an assignment that accepts online text submissions and file submissions
      2. Login as a student and attempt to submit empty text ('') and no files
      3. Check that you receive a notification that "Nothing was submitted" and the submission is not accepted.
      4. Upload a file and save the submission
      5. The submission should be saved
      Show
      Create an assignment that accepts online text submissions (and nothing else) Login as a student and attempt to submit empty text ('') Check that you receive a notification that "Nothing was submitted" and the submission is not accepted. Enter some text and save the submission The submission should be saved Create an assignment that accepts file submissions (and nothing else) Login as a student and attempt to submit without uploading any files Check that you receive a notification that "Nothing was submitted" and the submission is not accepted. Upload a file and save the submission The submission should be saved Create an assignment that accepts online text submissions and file submissions Login as a student and attempt to submit empty text ('') and no files Check that you receive a notification that "Nothing was submitted" and the submission is not accepted. Upload a file and save the submission The submission should be saved
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
      git@github.com:damyon/moodle.git
    • Pull Master Branch:
      MDL-35963-master
    • Rank:
      44722

      Description

      To reproduce...

      • create an Assignment activity only allowing file uploads
      • add a student to the course as required
      • login as that student
      • go to the assignment upload page.
      • do not drag-and-drop a file, do not select a file. Simply click 'Save changes'. The submission is accepted

      The student is now marked as having submitted a file without actually having submitted a file.

        Issue Links

          Activity

          Hide
          Mary Cooch added a comment -

          Just to say -I tried this and I could replicate it.

          Show
          Mary Cooch added a comment - Just to say -I tried this and I could replicate it.
          Hide
          Howard Miller added a comment -

          Tested with latest weekly '2.3.2+ (Build: 20121005)', just the same.

          Show
          Howard Miller added a comment - Tested with latest weekly '2.3.2+ (Build: 20121005)', just the same.
          Hide
          Helen Foster added a comment -

          Removing Assignment(2.2) component (for old assignment module with separate assignment types) as only new assignment module affected.

          Show
          Helen Foster added a comment - Removing Assignment(2.2) component (for old assignment module with separate assignment types) as only new assignment module affected.
          Hide
          Michael Aherne added a comment -

          Just to add, we've seen this and it caused the following specific problem:

          A student (who was presumably used to uploading files by drag-and-drop on Chrome or Firefox) tried to upload her submission by drag and drop, but was using Internet Explorer at the time so it didn't upload. She didn't notice and submitted the assignment anyway, and wasn't aware that there was a problem.

          I wonder if a new "minimum number of uploaded files" setting on the assignment (defaulting to 1) would be a useful solution to this?

          Show
          Michael Aherne added a comment - Just to add, we've seen this and it caused the following specific problem: A student (who was presumably used to uploading files by drag-and-drop on Chrome or Firefox) tried to upload her submission by drag and drop, but was using Internet Explorer at the time so it didn't upload. She didn't notice and submitted the assignment anyway, and wasn't aware that there was a problem. I wonder if a new "minimum number of uploaded files" setting on the assignment (defaulting to 1) would be a useful solution to this?
          Hide
          Dan Bennett added a comment -

          Ah. Ive just seen this appear in my inbox.
          I've replicated this issue twice today. I've also had similar where it fails to upload a file, so I try again and it doesn't let me because it's gone over the max uploads for the assignment (1), even though the first upload doesn't show. Have to refresh the page.

          Show
          Dan Bennett added a comment - Ah. Ive just seen this appear in my inbox. I've replicated this issue twice today. I've also had similar where it fails to upload a file, so I try again and it doesn't let me because it's gone over the max uploads for the assignment (1), even though the first upload doesn't show. Have to refresh the page.
          Hide
          Monash University VLE team added a comment -

          Not only does the file submission allow an assignment to be submitted with no files attached, but the online text also allows the user to submit with no text. In both these cases, the teacher is then shown that there is a submission ready for grading (and gets emailed about it) but nothing appears. I imagine that as a teacher I would find this quite confusing.

          I think the behaviour should be as such:

          1. If the teacher chooses 'Online text' only, then the student should have to submit some text for the submission to be saved.
          2. If the teacher chooses 'File submissions' only, then the student should have to submit a file for the submission to be saved.
          3. If the teacher chooses both 'Online text' and 'File submissions', then it should warn the student that they have not uploaded a file, but let them proceed. However, they should not be allowed to submit the assignment without either submitting text or a file.

          Regards,
          Russell

          Show
          Monash University VLE team added a comment - Not only does the file submission allow an assignment to be submitted with no files attached, but the online text also allows the user to submit with no text. In both these cases, the teacher is then shown that there is a submission ready for grading (and gets emailed about it) but nothing appears. I imagine that as a teacher I would find this quite confusing. I think the behaviour should be as such: 1. If the teacher chooses 'Online text' only, then the student should have to submit some text for the submission to be saved. 2. If the teacher chooses 'File submissions' only, then the student should have to submit a file for the submission to be saved. 3. If the teacher chooses both 'Online text' and 'File submissions', then it should warn the student that they have not uploaded a file, but let them proceed. However, they should not be allowed to submit the assignment without either submitting text or a file. Regards, Russell
          Hide
          Louise Kelly (UNE) added a comment -

          Ref: Michael Aherne's comment above: A student (who was presumably used to uploading files by drag-and-drop on Chrome or Firefox) tried to upload her submission by drag and drop, but was using Internet Explorer at the time so it didn't upload. She didn't notice and submitted the assignment anyway, and wasn't aware that there was a problem.

          Just want to confirm we have had students do the same - swearing blind they 'uploaded a file' but didn't notice the file missing when they went through the rest of the submission process.

          Louise
          Client Service Officer (VLE)
          University of New England
          AUS

          Show
          Louise Kelly (UNE) added a comment - Ref: Michael Aherne's comment above: A student (who was presumably used to uploading files by drag-and-drop on Chrome or Firefox) tried to upload her submission by drag and drop, but was using Internet Explorer at the time so it didn't upload. She didn't notice and submitted the assignment anyway, and wasn't aware that there was a problem. Just want to confirm we have had students do the same - swearing blind they 'uploaded a file' but didn't notice the file missing when they went through the rest of the submission process. Louise Client Service Officer (VLE) University of New England AUS
          Hide
          Helen Foster added a comment -

          Thanks everyone for your comments. I realised that our QA testing should really include checks to ensure it is not possible to make an assignment submissions without uploading a file or entering some text, and so I have amended a couple of tests and am linking them to this issue.

          Once this issue is fixed, the QA tests can be reset ready to be run again.

          Show
          Helen Foster added a comment - Thanks everyone for your comments. I realised that our QA testing should really include checks to ensure it is not possible to make an assignment submissions without uploading a file or entering some text, and so I have amended a couple of tests and am linking them to this issue. Once this issue is fixed, the QA tests can be reset ready to be run again.
          Hide
          Michael Aherne added a comment -

          I've started looking at writing a patch for this issue based on the suggestion from Russell from Monash University. It turns out that all the submission plugins actually implement an is_empty() method, so it's only a few lines of code to work out whether they're all empty and prevent the submission from submitting (https://github.com/micaherne/moodle/commit/0b1810ba041188e1f7910776ce871381566d6987)

          What I can't work out is how to show a message to the student (short of print_error, which isn't really appropriate). Any ideas?

          Show
          Michael Aherne added a comment - I've started looking at writing a patch for this issue based on the suggestion from Russell from Monash University. It turns out that all the submission plugins actually implement an is_empty() method, so it's only a few lines of code to work out whether they're all empty and prevent the submission from submitting ( https://github.com/micaherne/moodle/commit/0b1810ba041188e1f7910776ce871381566d6987 ) What I can't work out is how to show a message to the student (short of print_error, which isn't really appropriate). Any ideas?
          Hide
          Damyon Wiese added a comment -

          Hi All,

          I'm happy to write a patch for this - but if you have one already Michael I'll be happy to review it.

          Just a to confirm the required functionality in the case where there is more than one submission type enabled - if online text and file submissions are enabled, and the student provides some text but no file - this seems like an acceptable submission to me - is this correct?

          • Damyon
          Show
          Damyon Wiese added a comment - Hi All, I'm happy to write a patch for this - but if you have one already Michael I'll be happy to review it. Just a to confirm the required functionality in the case where there is more than one submission type enabled - if online text and file submissions are enabled, and the student provides some text but no file - this seems like an acceptable submission to me - is this correct? Damyon
          Hide
          Helen Foster added a comment - - edited

          Good point Damyon, I can imagine a teacher setting an assignment in which a student must enter some text online but can choose whether to upload one (or more files).

          I guess the other way around, where they must upload a file but can choose whether they enter some text online can be achieved by setting file submissions to yes and submission comments to yes.

          Thus I would suggest that if both online text and file submissions are set to yes, then only the online text should be required for the submission to be saved. Sorry this seems different to your testing instructions.

          This is just my opinion though. It would be good to hear what all our issue participants and watchers think!

          Show
          Helen Foster added a comment - - edited Good point Damyon, I can imagine a teacher setting an assignment in which a student must enter some text online but can choose whether to upload one (or more files). I guess the other way around, where they must upload a file but can choose whether they enter some text online can be achieved by setting file submissions to yes and submission comments to yes. Thus I would suggest that if both online text and file submissions are set to yes, then only the online text should be required for the submission to be saved. Sorry this seems different to your testing instructions. This is just my opinion though. It would be good to hear what all our issue participants and watchers think!
          Hide
          Monash University VLE team added a comment -

          Hi Helen,

          When both online text and submission files are chosen we would be happy with either:

          1. Both are required for submission
          2. If only one option is chosen, warn the student before submitting that they have only entered one type and give them the chance to change it. Some text like "This assignment allows for both 'Online text' and 'File submissions'. You have only chosen to submit '$type'. Select 'Cancel' to go back or 'OK' to continue.". If they choose Cancel their previous work must remain. E.g If they had filled out the online text, then that text should still be there for the student so they don't have to re-type it, etc.

          Option 1 is simpler, which probably means it is better, although I think that teachers will use that setting in an 'or' method rather than 'and'. E.g Upload either text or a file, rather than text and a file, which Helen points out can be done with submission comments. If we go with option 1 the help text in the 'Submission settings' in the Assignment editing page for Online text and File submissions needs to be updated to reflect the changed conditions. Something like:

          Online text
          From: If enabled, students are able to type rich text directly into an editor field for their submission.
          To: If enabled, students must enter text into this field for their submission.

          File submissions
          From: If enabled, students are able to upload one or more files as their submission.
          To: If enabled, students must upload one or more files for their submission

          Regards,
          Russell

          Show
          Monash University VLE team added a comment - Hi Helen, When both online text and submission files are chosen we would be happy with either: 1. Both are required for submission 2. If only one option is chosen, warn the student before submitting that they have only entered one type and give them the chance to change it. Some text like "This assignment allows for both 'Online text' and 'File submissions'. You have only chosen to submit '$type'. Select 'Cancel' to go back or 'OK' to continue.". If they choose Cancel their previous work must remain. E.g If they had filled out the online text, then that text should still be there for the student so they don't have to re-type it, etc. Option 1 is simpler, which probably means it is better, although I think that teachers will use that setting in an 'or' method rather than 'and'. E.g Upload either text or a file, rather than text and a file, which Helen points out can be done with submission comments. If we go with option 1 the help text in the 'Submission settings' in the Assignment editing page for Online text and File submissions needs to be updated to reflect the changed conditions. Something like: Online text From: If enabled, students are able to type rich text directly into an editor field for their submission. To: If enabled, students must enter text into this field for their submission. File submissions From: If enabled, students are able to upload one or more files as their submission. To: If enabled, students must upload one or more files for their submission Regards, Russell
          Hide
          Louise Kelly (UNE) added a comment -

          re: "if both online text and file submissions are set to yes, then only the online text should be required for the submission to be saved"

          I think a difficulty must arise if multiple submission methods are set because all must be optional (none "required"). If you had to set one as "required" then it defeats the purpose of giving the students options. Is it possible to code it so that "any" is required without specifiying which one, if the coding is approached on the basis that a lecturer may enable all three submission types with any type being acceptable? Or is it going to be necessary to specify one as "required" to prevent the submission of nothing at all?

          Show
          Louise Kelly (UNE) added a comment - re: "if both online text and file submissions are set to yes, then only the online text should be required for the submission to be saved" I think a difficulty must arise if multiple submission methods are set because all must be optional (none "required"). If you had to set one as "required" then it defeats the purpose of giving the students options. Is it possible to code it so that "any" is required without specifiying which one, if the coding is approached on the basis that a lecturer may enable all three submission types with any type being acceptable? Or is it going to be necessary to specify one as "required" to prevent the submission of nothing at all?
          Hide
          Louise Kelly (UNE) added a comment -

          Having said that (above), I would say that for UNE if online text and file submission were both set, and one had to be specified as "required", then it should be the file submission, because online text does not go through Turnitin, whereas the file submission does.

          Maybe Monash is closer to the mark. If you set anything to yes perhaps the implication should be that it is required.

          Show
          Louise Kelly (UNE) added a comment - Having said that (above), I would say that for UNE if online text and file submission were both set, and one had to be specified as "required", then it should be the file submission, because online text does not go through Turnitin, whereas the file submission does. Maybe Monash is closer to the mark. If you set anything to yes perhaps the implication should be that it is required.
          Hide
          Damyon Wiese added a comment -

          We can implement it as either an AND or an OR. I think there would be cases where you would allow online text and file submissions and you don't mind which one students use - which would mean that OR is the right choice.

          Show
          Damyon Wiese added a comment - We can implement it as either an AND or an OR. I think there would be cases where you would allow online text and file submissions and you don't mind which one students use - which would mean that OR is the right choice.
          Hide
          Howard Miller added a comment -

          Erm... at the risk of being shot down. Why on earth would you want online text and file upload to be enabled at the same time? Is it beyond the ability of students to use text or word processors rather than typing directly into Moodle - which is probably a bad idea anyway?

          Show
          Howard Miller added a comment - Erm... at the risk of being shot down. Why on earth would you want online text and file upload to be enabled at the same time? Is it beyond the ability of students to use text or word processors rather than typing directly into Moodle - which is probably a bad idea anyway?
          Hide
          Monash University VLE team added a comment -

          I am not sure of why (or if) there is a need for both. However, the option for both currently exists so we would like it to work sensibly. MoodleHQ could remove the option to have both but would then need to retrofit the option without losing user data. I guess all existing assignments with both could be converted into File submission only with Online text in comments.

          I think Damyon is right in that if we have both it is more likely to be an 'OR'. In that case, it would be good to implement the warnings as described above to cover the issues that Michael and Louise raised regarding students not uploading files when they thought they had, etc.

          Regards,
          Russell

          Show
          Monash University VLE team added a comment - I am not sure of why (or if) there is a need for both. However, the option for both currently exists so we would like it to work sensibly. MoodleHQ could remove the option to have both but would then need to retrofit the option without losing user data. I guess all existing assignments with both could be converted into File submission only with Online text in comments. I think Damyon is right in that if we have both it is more likely to be an 'OR'. In that case, it would be good to implement the warnings as described above to cover the issues that Michael and Louise raised regarding students not uploading files when they thought they had, etc. Regards, Russell
          Hide
          Damyon Wiese added a comment -

          It sounds like OR is the right way to go here - I'll post a final patch soon if there are no objections.

          Show
          Damyon Wiese added a comment - It sounds like OR is the right way to go here - I'll post a final patch soon if there are no objections.
          Hide
          Michael Aherne added a comment -

          For me, the main thing for this issue is not allowing completely empty submissions, so I'd agree that OR is the best solution. If I remember correctly, we have some departments who allow (not force) the students to submit comments on their document alongside the document itself, which seems a reasonable case for having both online text and file upload enabled but not enforced.

          Show
          Michael Aherne added a comment - For me, the main thing for this issue is not allowing completely empty submissions, so I'd agree that OR is the best solution. If I remember correctly, we have some departments who allow (not force) the students to submit comments on their document alongside the document itself, which seems a reasonable case for having both online text and file upload enabled but not enforced.
          Hide
          Sam Hemelryk added a comment -

          Thanks Damyon, this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks Damyon, this has been integrated now
          Hide
          Sam Hemelryk added a comment -

          Marking as passed.

          I tested the 23 branch during integration and MDLQA-4658 and MDLQA-4659 will see this tested on master.

          Many thanks
          Sam

          Show
          Sam Hemelryk added a comment - Marking as passed. I tested the 23 branch during integration and MDLQA-4658 and MDLQA-4659 will see this tested on master. Many thanks Sam
          Hide
          Raymond Antonio added a comment - - edited

          Hi Damyon and Sam,
          Thanks for this and it looks good and passed.. but I got the assignment Submission status changed to 'submitted for grading' and grading summary's 'submitted' and 'needs grading' counts changed as well..after hitting the cancel button? as if some kind of assignment has been submitted though no submission submitted? shall I create a new tracker for this ? is this another/not related bug or maybe I've missed something while testing this ?
          Thanks Damyon and Sam
          Have a great day

          Show
          Raymond Antonio added a comment - - edited Hi Damyon and Sam, Thanks for this and it looks good and passed.. but I got the assignment Submission status changed to 'submitted for grading' and grading summary's 'submitted' and 'needs grading' counts changed as well..after hitting the cancel button? as if some kind of assignment has been submitted though no submission submitted? shall I create a new tracker for this ? is this another/not related bug or maybe I've missed something while testing this ? Thanks Damyon and Sam Have a great day
          Hide
          Damyon Wiese added a comment -

          Thanks for testing this again Raymond - I added a new issue for the problem you found (and I found another one too which is mentioned there).

          Regards, Damyon

          Show
          Damyon Wiese added a comment - Thanks for testing this again Raymond - I added a new issue for the problem you found (and I found another one too which is mentioned there). Regards, Damyon
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Y E S !

          Closing as fixed, many thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Y E S ! Closing as fixed, many thanks!
          Hide
          andrew middlemass added a comment -

          Hi Folks,

          Just come across a student submission with 'Submission status: Submitted for grading. the number of file(s) : 0 file(s)'. We are using 2.4.5

          I have managed to reproduce doing the following:

          1. Upload a file
          2. Save changes
          3. Edit my submission
          4. Delete
          5. Save changes, receive 'Nothing was submitted' message
          6. Press Back button on browser
          7. Press Back button on browser AGAIN
          8. End up on original submission page with file looking like it is ready to submit
          9. Click Submit assignment button
          10. Confirm submission
          11. Receive submission status screen, everything looks OK from student view
          12. View/grade all submissions as teacher/Admin
          13. No file visible
          14. Check logs - 'Submission status: Submitted for grading. the number of file(s) : 0 file(s)'

          Still seems possible that a student is now marked as having submitted a file without actually having submitted a file!

          Show
          andrew middlemass added a comment - Hi Folks, Just come across a student submission with 'Submission status: Submitted for grading. the number of file(s) : 0 file(s)'. We are using 2.4.5 I have managed to reproduce doing the following: 1. Upload a file 2. Save changes 3. Edit my submission 4. Delete 5. Save changes, receive 'Nothing was submitted' message 6. Press Back button on browser 7. Press Back button on browser AGAIN 8. End up on original submission page with file looking like it is ready to submit 9. Click Submit assignment button 10. Confirm submission 11. Receive submission status screen, everything looks OK from student view 12. View/grade all submissions as teacher/Admin 13. No file visible 14. Check logs - 'Submission status: Submitted for grading. the number of file(s) : 0 file(s)' Still seems possible that a student is now marked as having submitted a file without actually having submitted a file!

            People

            • Votes:
              8 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: