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

Allow user to manage storage within course

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.6.1
    • Fix Version/s: 3.7.0
    • Component/s: File system
    • Labels:
    • Testing Instructions:
      Hide
      1. Go to a course which has multiple downloadable activities which contain files (example: a Page that contains one or more images; a File resource), in multiple sections.
      2. Download some of the activities in different sections. Wait for download to complete.
      3. Open the course menu (top right).
        • EXPECTED: There should be a 'Manage storage' option.
      4. Press 'Manage storage'
        • EXPECTED: The 'Manage storage' page should show:
        • A card at the top with the course title, an explanatory sentence (this is because in our testing users were worried about deleting data, they thought it might really delete things from the course, instead of just their device), information about the total storage used, and a delete button.
        • One card for each section with the section title and the total size for that section. Only sections where there is at least one activity with downloaded data are shown.
        • Within the section card, a list of all the activities with downloaded data. Each one shows the icon and title, the size of the data, and has a delete button (with outline style to distinguish it from the whole-section delete).
      5. Press the Delete button for an activity.
        • EXPECTED: The loading overlay should appear briefly, then go away. The data will be deleted. You can see this because the activity will disappear, the size shown for the section will decrease (if there are no activities left in the section then it will disappear too), and the total size for the course will decrease.
      6. Press the Delete button for a section.
        • EXPECTED: The loading overlay should appear briefly, then go away. The data will be deleted. You can see this because the section will disappear from this page, and the total size for the course will decrease.
      7. Press the Delete button for the whole course.
        • EXPECTED: The loading overlay should appear briefly, then go away. The data will be deleted. You can see this because all the sections will disappear from this page, and the total size for the course will change to 0, and the delete button will be greyed out.
      Show
      Go to a course which has multiple downloadable activities which contain files (example: a Page that contains one or more images; a File resource), in multiple sections. Download some of the activities in different sections. Wait for download to complete. Open the course menu (top right). EXPECTED: There should be a 'Manage storage' option. Press 'Manage storage' EXPECTED: The 'Manage storage' page should show: A card at the top with the course title, an explanatory sentence (this is because in our testing users were worried about deleting data, they thought it might really delete things from the course, instead of just their device), information about the total storage used, and a delete button. One card for each section with the section title and the total size for that section. Only sections where there is at least one activity with downloaded data are shown. Within the section card, a list of all the activities with downloaded data. Each one shows the icon and title, the size of the data, and has a delete button (with outline style to distinguish it from the whole-section delete). Press the Delete button for an activity. EXPECTED: The loading overlay should appear briefly, then go away. The data will be deleted. You can see this because the activity will disappear, the size shown for the section will decrease (if there are no activities left in the section then it will disappear too), and the total size for the course will decrease. Press the Delete button for a section. EXPECTED: The loading overlay should appear briefly, then go away. The data will be deleted. You can see this because the section will disappear from this page, and the total size for the course will decrease. Press the Delete button for the whole course. EXPECTED: The loading overlay should appear briefly, then go away. The data will be deleted. You can see this because all the sections will disappear from this page, and the total size for the course will change to 0, and the delete button will be greyed out.
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull Master Branch:
    • Sprint:
      Moodle App 3.7.0

      Description

      This change creates a new page that allows the user to manage storage usage within a course. They can then delete activities (same as from the activity menu), or a whole section, or the whole course.

      In all cases this works only for file storage and not anything else - it's just another interface to the existing facilities already available when you go inside an individual activity and use the 'delete' menu option. But obviously it's much easier if you can e.g. delete data for all the activities in a week once you finish studying that week, or all the activities in a course when you finish studying the course.

      In our user testing of the Moodle app, storage on the device was one of the test users' major concerns - especially because of how it automatically downloads stuff as you view it. This gives users a nice at-a-glance way to manage storage within a course.

      I'll attach screenshots to demonstrate that it looks pretty nice imo.

      Some notes:

      1. I implemented this as an addon because I thought it was a nice way to keep the code separate. That requires a new delegate for adding items to the course menu, which I've implemented and will file as a separate issue.

      2. Regarding the user interface, I added an explanatory sentence to the screen. This is because in user testing, our users were worried that the delete icons would 'really' delete things from the course, rather than just free up space on their device.

      3. I didn't put confirmation prompts on the delete buttons because, with the explanatory sentence, it seems pretty clear what they do, and I didn't want to scare users. Also, users may want to use this frequently (e.g. every week go and delete out last week) so it should be quick.

      4. There is no connection between this and the existing option to wipe all storage for a whole site at once (from Settings). I don't think this is a critical problem however if we get a chance, we do plan to implement another page in between the two (that does a list of courses). That would obviously be another issue.

      5. A known issue, which I should file as a separate tracker if I remember (and I'm not sure we currently intend to fix) is that if you view a page and it automatically downloads an image [as opposed to you actively downloading the activity], this doesn't seem to update the cached download size for the module, which means it won't show up on the new 'Manage storage' page unless you exit and restart the app. However, this is not part of the new UI and already applies to the existing code, because the dropdown menu in the activity that lets you delete the data & shows you the size, also doesn't update until you restart the app.

      6. One thing that may confuse users is that (same as current interface) you cannot delete any of the web service results or other stuff that is downloaded that doesn't go into the filesystem. For example, if you click 'Download' next to an activity that doesn't contain any attached files, then it won't show up on this list. I don't have a solution for this yet, so far as I know we don't categorise these things in a way that they could be deleted at present.. Also they are likely to be rather small compared to video files so hopefully it's not too big a problem! I tried to hint at this by using the word 'files' in explanatory text on the manage storage page.

        Attachments

        1. ManageStorage_photo_2019-05-16_13-01-37.jpg
          ManageStorage_photo_2019-05-16_13-01-37.jpg
          62 kB
        2. MOBILE-2905-coursemenu.png
          MOBILE-2905-coursemenu.png
          133 kB
        3. MOBILE-2905-managestorage.png
          MOBILE-2905-managestorage.png
          46 kB
        4. Offload 1.png
          Offload 1.png
          325 kB
        5. Offload 2.png
          Offload 2.png
          328 kB
        6. Offload 3.png
          Offload 3.png
          174 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  7/Jun/19