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

Links (<a>) to files: first time opened in browser

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.9.5
    • 4.0.0
    • File system
    • Hide

      This issue only needs to be tested in a tablet device, it doesn't matter the OS.

      1. In the app, login as a student that wasn't already stored in the device before. E.g. you can delete the account from the app and add it again.
      2. Open MM Dev Testing Course and go to Resource: Book section.
      3. Click "Link to a PDF file using tokenpluginfile URL". Check that a local PDF file is opened (it's not opened in browser).
      4. Back in the app, without leaving the page click the user avatar in the tab bar.
      5. Click "Preferences" and delete the Space usage.
      6. Go back to previous page and click "Link to a PDF file using tokenpluginfile URL" again. Check that a local PDF file is opened (it's not opened in browser), the app re-downloads the file automatically after deleting it because it's still visible. Please notice that, if the file is being downloaded when you click the link, you will see a loading modal until the file is downloaded.
      Show
      This issue only needs to be tested in a tablet device, it doesn't matter the OS. In the app, login as a student that wasn't already stored in the device before. E.g. you can delete the account from the app and add it again. Open MM Dev Testing Course and go to Resource: Book section. Click "Link to a PDF file using tokenpluginfile URL". Check that a local PDF file is opened (it's not opened in browser). Back in the app, without leaving the page click the user avatar in the tab bar. Click "Preferences" and delete the Space usage. Go back to previous page and click "Link to a PDF file using tokenpluginfile URL" again. Check that a local PDF file is opened (it's not opened in browser), the app re-downloads the file automatically after deleting it because it's still visible. Please notice that, if the file is being downloaded when you click the link, you will see a loading modal until the file is downloaded.
    • MOODLE_39_STABLE
    • MOODLE_400_STABLE
    • Moodle App 4.0

    Description

      When we render a link (<a>) to a file created by a user in Moodle, the app downloads the file in background and leaves the online URL in the anchor. If the user clicks this link, it will be opened in browser and the browser will start the download. This means the user will download the file twice: once inside the app and once in browser.

      IMO we shouldn't open the browser in this case. Once the file is downloaded, we should update the link to use the local URL. If the user clicks the link while the file is being downloaded, we should display a loading modal and, once downloaded, open it in the app.

      Attachments

        Activity

          People

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Isabel Renedo Rouco Isabel Renedo Rouco
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              22/Apr/22