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

mod_h5pactivity produce an error on filepicker when the file is deleted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.9
    • Fix Version/s: 3.9
    • Component/s: H5P
    • Testing Instructions:
      Hide

      Manual testing

      1. Login as admin.
      2. Create a course.
      3. Create an h5p activity using the provided h5p package (ipsums-2-5.h5p).
      4. Submit the creating form with the button "save and display".
      5. Once on the activity, open the cog menú and click on "edit settings".
      6. On the h5p package file picker, click on the file to open the file modal.
      7. Click on the button "delete" on the top part of the modal and confirm the deletion.
      8. Once the file is deleted the "Add..." button appears in the file picker. Click on it to open the repositories modal.
      9. Select "server files" repository
        1. Check that no error appears.
      10. Browse the "server files" to the system level and navigate through some directories
        1. Check that no error appears.
      Show
      Manual testing Login as admin. Create a course. Create an h5p activity using the provided h5p package ( ipsums-2-5.h5p ). Submit the creating form with the button "save and display". Once on the activity, open the cog menú and click on "edit settings". On the h5p package file picker, click on the file to open the file modal. Click on the button "delete" on the top part of the modal and confirm the deletion. Once the file is deleted the "Add..." button appears in the file picker. Click on it to open the repositories modal. Select "server files" repository Check that no error appears. Browse the "server files" to the system level and navigate through some directories Check that no error appears.
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-68502-master

      Description

      If an h5pactivity the h5p package is deleted and then open the "server files" repositories produces an error.

      Exception - Argument 9 passed to h5pactivity_get_file_info() must be of the type string, null given, called in [dirroot]/lib/filebrowser/file_info_context_module.php on line 119

      How to reproduce

      1. Create a course
      2. Create an h5p activity using the provided h5p package (ipsums-2-5.h5p)
      3. Submit the creating form with the button "save and display"
      4. Once on the activity, open the cog menú and click on "edit settings"
      5. on the h5p package file picker, click on the file to open the file model
      6. Click on the button "delete" on the top part of the modal and confirm the deletion
      7. Once the file is deleted the "Add..." button appears in the file picker. Click on it to open the reporistories modal.
      8. Select "server files" repository
      9. An error appears

       

        Attachments

        1. ipsums-2-5.h5p
          532 kB
        2. MDL-68502.jpg
          MDL-68502.jpg
          34 kB

          Activity

            People

            Assignee:
            tusefomal Ferran Recio
            Reporter:
            tusefomal Ferran Recio
            Peer reviewer:
            Carlos Escobedo
            Integrator:
            Andrew Nicols
            Tester:
            Anna Carissa Sadia
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Jun/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 15 minutes
                4h 15m