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

Offload course files - error: "Cannot read property 'getFiles' of undefined

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.9.2
    • Fix Version/s: 3.9.3
    • Component/s: Offline
    • Labels:
    • Testing Instructions:
      Hide

      This issue only needs to be tested in 1 device.

      1. In web as admin, install an activity plugin that cannot be downloaded in the app (e.g. mod_hvp, but not choicegroup because choicegroup supports offline). It doesn't matter if the activity is supported in the app or not, the important part is that it doesn't support offline.
      2. Create a course and add 2 activities: a Page and an instance of the plugin installed in step 1.
      3. In the app, login with a user enrolled in the course.
      4. In the Dashboard, download the course.
      5. Once downloaded, open the top-right menu in the Dashboard and click "Manage storage".
      6. Click the trash button next to the course and confirm. Check that the files are removed and no error is displayed.
      Show
      This issue only needs to be tested in 1 device. In web as admin, install an activity plugin that cannot be downloaded in the app (e.g. mod_hvp, but not choicegroup because choicegroup supports offline). It doesn't matter if the activity is supported in the app or not, the important part is that it doesn't support offline. Create a course and add 2 activities: a Page and an instance of the plugin installed in step 1. In the app, login with a user enrolled in the course. In the Dashboard, download the course. Once downloaded, open the top-right menu in the Dashboard and click "Manage storage". Click the trash button next to the course and confirm. Check that the files are removed and no error is displayed.
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
    • Sprint:
      Moodle App 3.9.3

      Description

      Hi there,

      I'm having problems removing course files from my device. Using Moodle 3.9.1+ and Moodle app 3.9.2.

      From App Settings > Space Usage  - it works fine. I can delete the files from there.

      From the course list, though I get the error: "Cannot read property 'getFiles' of undefined"

      Steps to reproduce

      1. Login to the Mobile App
      2. Download a course to your device (my sample contains a Book and a few H5P activities)
      3. Check that the course works whilst offline
      4. Go back to the course list
      5. Scenario A: Whilst online
        1. Select the menu (three dots)
        2. Select "Offload all course data'
        3. Answer "Delete" when you're asked "Are you sure..."
      6. Scenario B: Whilst offine
        1. Select the menu (three dots)
        2. Select "Offload all course data'
        3. Answer "Delete" when you're asked "Are you sure..."

      Expected behaviour

      **Scenario A: Course files are deleted from device

      Scenario B: Course files are deleted from device

      Actual behaviour

      Scenario A: Error: Cannot read property 'getFiles' of undefined

      Scenario B: Error: Cannot read property 'getFiles' of undefined

        Attachments

          Activity

            People

            Assignee:
            dpalou Dani Palou
            Reporter:
            berthelemy Mark Berthelemy
            Peer reviewer:
            Noel De Martin Noel De Martin
            Integrator:
            Juan Leyva Juan Leyva
            Tester:
            Pau Ferrer Pau Ferrer
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              30/Nov/20