Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-3761

Show "open with" dialog when opening a file

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test in iOS: Standard app

      1. In web as teacher, create a mod_resource and a mod_folder with at least 1 file.
      2. In the app, open the mod_resource. Check that you see 2 buttons: Open and Open with.
      3. Click the Open button. Check that the file is opened inside the app like it used to.
      4. Click the "Open with" button. Check that a modal appears to let you choose which app to use to open the file.
      5. Go back to course page. At the right of the resource, check that you see the same icon you saw in the "Open" button.
      6. Click that button. Check that the file is opened inside the app like it used to.
      7. Now open the folder. Check that you only see the download button in the file.
      8. Download the file. Check that a Share button appears now.
      9. Click the Share button. Check that a modal appears to let you choose which app to use to open the file.
      10. Click the whole file. Check that the file is opened inside the app like it used to.

      Test in iOS: BMA

      To test this part you will need to compile an app using "iOSDefaultOpenFileAction": "open-with" in the moodle.config.json.

      Repeat all the tests in the previous section. The only differences are:

      5-6: Now the app displays the Share button, and clicking it displays the modal to choose app.

      8-10: Now the button displays the "Open" icon and the behaviour is the opposite: clicking the button opens the file inside the app, clicking the whole file opens the choose app modal. 

      Test in Android

      Check that the behaviour hasn't changed in Android:

      1. Inside mod_resource you only see 1 button: Open. It opens the file in the app.
      2. In the folder you don't see the share button even if the file is downloaded.
      Show
      Test in iOS: Standard app In web as teacher, create a mod_resource and a mod_folder with at least 1 file. In the app, open the mod_resource. Check that you see 2 buttons: Open and Open with. Click the Open button. Check that the file is opened inside the app like it used to. Click the "Open with" button. Check that a modal appears to let you choose which app to use to open the file. Go back to course page. At the right of the resource, check that you see the same icon you saw in the "Open" button. Click that button. Check that the file is opened inside the app like it used to. Now open the folder. Check that you only see the download button in the file. Download the file. Check that a Share button appears now. Click the Share button. Check that a modal appears to let you choose which app to use to open the file. Click the whole file. Check that the file is opened inside the app like it used to. Test in iOS: BMA To test this part you will need to compile an app using "iOSDefaultOpenFileAction": "open-with" in the moodle.config.json. Repeat all the tests in the previous section. The only differences are: 5-6: Now the app displays the Share button, and clicking it displays the modal to choose app. 8-10: Now the button displays the "Open" icon and the behaviour is the opposite: clicking the button opens the file inside the app, clicking the whole file opens the choose app modal.  Test in Android Check that the behaviour hasn't changed in Android: Inside mod_resource you only see 1 button: Open. It opens the file in the app. In the folder you don't see the share button even if the file is downloaded.
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
    • Sprint:
      Moodle App 3.9.5

      Description

      We have had issues with users opening files on iOS. Some files such as powerpoint and word documents will open in a preview which may not render the file well. To open another app, they then have to use the "Share" icon in the preview before they are given the option to open it in something else. This isn't obvious, and users have complained about files not displaying properly.

      ionic5 now has a "showOpenWith" method in the FileOpener class, which lets the user select an app before the file is shown. This also makes it clear that they are leaving the Moodle app and moving to another, which has been another source of confusion when previewing files. We think we should use this instead of the current method.

        Attachments

        1. android.mp4
          5.61 MB
        2. image-2021-05-19-15-19-33-002.png
          image-2021-05-19-15-19-33-002.png
          239 kB
        3. ios_open_with_01.jpg
          ios_open_with_01.jpg
          50 kB
        4. ios_open_with_02.jpg
          ios_open_with_02.jpg
          104 kB
        5. ios_open_with_03.jpg
          ios_open_with_03.jpg
          110 kB
        6. ios_open_with_04.jpg
          ios_open_with_04.jpg
          87 kB
        7. ios_open_with_05.jpg
          ios_open_with_05.jpg
          86 kB
        8. ios.mp4
          8.10 MB

          Activity

            People

            Assignee:
            dpalou Dani Palou
            Reporter:
            marxjohnson Mark Johnson
            Peer reviewer:
            Noel De Martin Noel De Martin
            Integrator:
            Pau Ferrer Pau Ferrer
            Tester:
            Pau Ferrer Pau Ferrer
            Participants:
            Component watchers:
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              27/Aug/21