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

H5P activity Link to file error after removing user

XMLWordPrintable

    • HQ 2024 Sprint I2.1 Moppies
    • Small

      Tested in Moodle 3.9 + 4.1 (Boost theme)

      Error

      Reproduction steps:

      Login with an user with privileges to create courses and users by example a siteadmin/manager

      1. Login as admin/manager (an user that can create courses) 
      2. Create a user named "Editing Teacher" 
      3. Create a course named Contentbank
      4. Enrol 'Editing Teacher' with the rol Teacher (editing teacher)
      5. Create a course named: activity
      6. Enrol 'Editing Teacher' with the rol Teacher (editing teacher)

      Login as Editing Teacher

      1. Go to course named: Contentbank
      2. Go to  the contentbank
      3. Add a h5P contenttype, name it "File corrupt" (I used coursepresentation, with some random text) 
      4. Go to the course: activity
      5. Add a H5P Core activity to the course named: File corrupt
      6. Click in package file on 'add'
      7. Click on content bank
      8. Navigate to the course where you have created the content
      9. choose 'create an alias/shortcut to the file' / Link to file 
      10. Select the contentfile you created in step 3
      11. click on save and display
      12. You should be able to see the content

      Login with an user with privileges to see all courses, deleted users and edit contentbank items by example a siteadmin/manager

      1. Go to the course: activity
      2. Click on H5P activity: file corrupt
      3. You should be able to see the content
      4. navigate to siteadmin > Users > Accounts > Browse list of users.
      5. Search the user named "Editing Teacher" 
      6. Delete the account
      7. Go back to course: Activity
      8. You should be able to see the content
      9. Go to course named: Contentbank
      10. Go to  the contentbank
      11. Click on content file named File corrupt 
      12. Click edit
      13. Click save (you don't have to make changes) 
      14. Go to the course: activity
      15. Click on H5P activity: file corrupt
      16. You now see the notification "This file can't be displayed because it has been uploaded by a user without the required capability to deploy h5p content'
      17. Edit the H5P activity 
      18. Remove the content from the Package file
      19. Click in package file on 'add'
      20. Click on content bank
      21. Navigate to the course where you have created the content
      22. choose 'create an alias/shortcut to the file'
      23. Select this file
      24. You should be able to see the content

      I think it is the repository but I don't know how this is different from other repository behavior and if this is expected behavior but it at least not behavior you really would like to have. 

       

      NOTE: 22-05-2023 we found out when we restore the user from the database, and place it back in the same premissions the issue is also being resolved. 

        1. image.png
          image.png
          8 kB
        2. image-2023-03-22-10-11-44-097.png
          image-2023-03-22-10-11-44-097.png
          15 kB
        3. image-2023-04-06-18-18-54-189.png
          image-2023-04-06-18-18-54-189.png
          8 kB
        4. image-2023-09-28-09-50-01-469.png
          image-2023-09-28-09-50-01-469.png
          227 kB
        5. image-2023-09-28-09-54-49-020.png
          image-2023-09-28-09-54-49-020.png
          80 kB
        6. image-2023-09-28-09-56-55-652.png
          image-2023-09-28-09-56-55-652.png
          21 kB
        7. MDL-77665.png
          MDL-77665.png
          108 kB

            laurent.david@moodle.com Laurent David
            gemguardian Gemma Lesterhuis
            Amaia Anabitarte Amaia Anabitarte
            Ferran Recio Ferran Recio
            CiBoT CiBoT
            Votes:
            36 Vote for this issue
            Watchers:
            32 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 11 minutes
                1d 2h 11m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.