Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-78196

core_user_add_user_private_files is not checking correctly the private files used space

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-78196-401
    • MDL-78196-master
    • Hide
      Prerequisite
      1. Moodle mobile app.
      2. Your Moodle mobile app should be able to connect to your Moodle website. You can either do the following:
        • Ensure that the phone with the mobile app and the web server are on the same network. Or
        • Expose the web server over the internet via ngrok.
      Test
      1. As an admin, enable “Web services for mobile devices” on Site administration ► Advanced features
      2. In Administration > Security > Site security settings set a userquota of 2MB
      3. Using the mobile app, login as a normal user into your site (not admin)
      4. Access User account > Files > Private Files
      5. Upload one file small in size, less than 2 MB
      6. Try to upload a larger file (2MB) minimum
      7. Confirm you see an error that the file is larger than the space remaining in this area
      8. Now, repeat the previous steps but using the admin account
      9. Confirm you don't see any errors and that you are able to exceed the user quota of 2MB
      Show
      Prerequisite Moodle mobile app. Your Moodle mobile app should be able to connect to your Moodle website. You can either do the following: Ensure that the phone with the mobile app and the web server are on the same network. Or Expose the web server over the internet via ngrok. Test As an admin, enable “Web services for mobile devices” on Site administration ► Advanced features In Administration > Security > Site security settings set a userquota of 2MB Using the mobile app, login as a normal user into your site (not admin) Access User account > Files > Private Files Upload one file small in size, less than 2 MB Try to upload a larger file (2MB) minimum Confirm you see an error that the file is larger than the space remaining in this area Now, repeat the previous steps but using the admin account Confirm you don't see any errors and that you are able to exceed the user quota of 2MB
    • 1
    • Team Hedgehog 2023 Sprint 2.1

      By mistake when MDL-73226 was implemented I used the following function to calculate the user used space:
      file_get_user_used_space()
       
      But the previous function calculates all the user-used space including backups and other stuff while the correct approach would've been just to calculate the used space in the user private files area.

            jleyva Juan Leyva
            jleyva Juan Leyva
            Rodrigo Mady Rodrigo Mady
            Huong Nguyen Huong Nguyen
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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