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

Add support for terabytes and petabytes in the display_size function

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE
    • MDL-69718-display-size
    • Hide

      Just unit tests

      Or if you want to see if in the gui a quick hack is add a couple zeros here:

      --- a/lib/portfoliolib.php
      +++ b/lib/portfoliolib.php
      @@ -1007,7 +1007,7 @@ function portfolio_expected_time_file($totest) {
        */
       function portfolio_filesize_info() {
           $filesizes = array();
      -    $sizelist = array(10240, 51200, 102400, 512000, 1048576, 2097152, 5242880, 10485760, 20971520, 52428800);
      +    $sizelist = array(10240, 51200, 102400, 512000, 1048576, 2097152, 5242880, 10485760, 20971520, 5242880000);
           foreach ($sizelist as $size) {
               $filesizes[$size] = display_size($size);
           }
      l

      And then see it in the admin gui here:

      http://moodle.local/admin/settings.php?section=manageportfolioscommon

      Show
      Just unit tests Or if you want to see if in the gui a quick hack is add a couple zeros here: --- a/lib/portfoliolib.php +++ b/lib/portfoliolib.php @@ -1007,7 +1007,7 @@ function portfolio_expected_time_file($totest) { */ function portfolio_filesize_info() { $filesizes = array(); - $sizelist = array(10240, 51200, 102400, 512000, 1048576, 2097152, 5242880, 10485760, 20971520, 52428800); + $sizelist = array(10240, 51200, 102400, 512000, 1048576, 2097152, 5242880, 10485760, 20971520, 5242880000); foreach ($sizelist as $size) { $filesizes[$size] = display_size($size); } l And then see it in the admin gui here: http://moodle.local/admin/settings.php?section=manageportfolioscommon

      It only goes as big as gigabytes

            brendanheywood Brendan Heywood
            brendanheywood Brendan Heywood
            Misha Golenkov Misha Golenkov
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m

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