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

Downlad errors generated by the Cordova FileTransfer plugin might content full Moodle LMS pages breaking the UI

XMLWordPrintable

    • Hide

      Access to the moodledata directory of the server is required to simulate a missing file error.

      Test on Android and iOS.

      1. Create an assignment with file submissions.
      2. Download image https://moodle.org/theme/moodleorg/pix/moodle_logo_TM.svg
      3. In Moodle, as a student, submit the downloaded image.
      4. Access the moodledata directory in the server and remove the following file: {{filedir/86/00/8600e0de29fc4e49acecb9363c75e722bd8a6979 }}(the name matches the content hash of the downloaded file)
      5. In the app, as the student, go to the assignment.
      6. Try to open the submitted file.
      7. Check that it displays an error modal with text "Cannot read file 'moodle_logo_TM.svg'. Either the file does not exist or there is a permission problem."

       

       

       

      Show
      Access to the moodledata directory of the server is required to simulate a missing file error. Test on Android and iOS. Create an assignment with file submissions. Download image https://moodle.org/theme/moodleorg/pix/moodle_logo_TM.svg In Moodle, as a student, submit the downloaded image. Access the moodledata directory in the server and remove the following file: {{filedir/86/00/8600e0de29fc4e49acecb9363c75e722bd8a6979 }}(the name matches the content hash of the downloaded file) In the app, as the student, go to the assignment. Try to open the submitted file. Check that it displays an error modal with text "Cannot read file 'moodle_logo_TM.svg'. Either the file does not exist or there is a permission problem."      
    • Moodle Apps - 2024 i3.1, Moodle Apps - 2024 i3.2

      This is only happening in Android and iOS devices, when we use the Cordova plugin for downloading files.

      It seems that in some unexpected scenarios Moodle LMS might return pages with 404 errors and as part of the response include a lot of HTML, it seems that the Cordova plugin is not treating this correctly and instead of returning just "Not found" it is returning all the page HTML, breaking the UI

      This is not easy to reproduce but in any case we need to implement something to limit the amount of chars displayed in the message:

      Error downloading files. Some files might be missing. STRING_RETURNED_BY_FILE_TRANSFER

      Expected error:

      Unexpected error:

        1. expected-error.png
          expected-error.png
          11 kB
        2. screenshot-1.png
          screenshot-1.png
          475 kB
        3. unexpected-error.png
          unexpected-error.png
          212 kB

            albert.gasset@moodle.com Albert Gasset
            jleyva Juan Leyva
            Dani Palou Dani Palou
            Juan Leyva Juan Leyva
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

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

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