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

Quiz manual grading: attached files not downloadable with certain permissions

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Login as admin
      2. Remove the capability mod/quiz:viewreports from the role Non-editing teacher (on standard Moodle instances: admin/roles/define.php?action=view&roleid=4)
      3. Logout
      4. Login as Teacher T and go to Course A
      5. Turn editing on
      6. Add a new quiz instance:
        1. Title: "Test attachments"
      7. Edit quiz
      8. Add a new essay question
        1. Question name: Essay with attachments
        2. Question text: Add an attachment.
        3. Response format: No online text
        4. Allow attachments: 1
        5. Allow attachments: 1
      9. Logout
      10. Login as Student S
      11. Go to Course A
      12. Make the quiz, add example_attachment.pdf and finish attempt
      13. Submit all and finish
      14. Logout
      15. Login as Non-editing teacher N
      16. Go to Course A
      17. Open the quiz "Test attachments"
      18. Go to manual grading page
      19. Click on "grade"
      20. Click on the attached file "example_attachment.pdf
      21. Confirm: file downloads and can be opened
      Show
      Login as admin Remove the capability mod/quiz:viewreports from the role Non-editing teacher (on standard Moodle instances: admin/roles/define.php?action=view&roleid=4) Logout Login as Teacher T and go to Course A Turn editing on Add a new quiz instance: Title: "Test attachments" Edit quiz Add a new essay question Question name: Essay with attachments Question text: Add an attachment. Response format: No online text Allow attachments: 1 Allow attachments: 1 Logout Login as Student S Go to Course A Make the quiz, add example_attachment.pdf and finish attempt Submit all and finish Logout Login as Non-editing teacher N Go to Course A Open the quiz "Test attachments" Go to manual grading page Click on "grade" Click on the attached file "example_attachment.pdf Confirm: file downloads and can be opened
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-58815_quiz_grade_permissions

      Description

      When removing permission mod/quiz:viewreports attached files in essay questions are no longer downloadable, rendering the message Sorry, the requested file could not be found.

      Steps to reproduce

      Prerequisites:

      • Course A
      • Users enrolled in this course: Student S, Teacher T and Non-editing teacher N

      Steps:

      1. Login as admin
      2. Remove the capability mod/quiz:viewreports from the role Non-editing teacher (on standard Moodle instances: admin/roles/define.php?action=view&roleid=4)
      3. Logout
      4. Login as Teacher T and go to Course A
      5. Turn editing on
      6. Add a new quiz instance:
        1. Title: "Test attachments"
      7. Edit quiz
      8. Add a new essay question
        1. Question name: Essay with attachments
        2. Question text: Add an attachment.
        3. Response format: No online text
        4. Allow attachments: 1
        5. Allow attachments: 1
      9. Logout
      10. Login as Student S
      11. Go to Course A
      12. Make the quiz, add example_attachment.pdf and finish attempt
      13. Submit all and finish
      14. Logout
      15. Login as Non-editing teacher N
      16. Go to Course A
      17. Open the quiz "Test attachments"
      18. Go to manual grading page
      19. Click on "grade"
      20. Click on the attached file "example_attachment.pdf
      21. See the error: "Sorry, the requested file could not be found"

      Optional:
      Countercheck with Teacher T and see that he is able to download the attachment.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              davosmith Davo Smith
              Reporter:
              cdipe Peter Diedrichs
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated: