Moodle
  1. Moodle
  2. MDL-30249

Display warning when downloading/uploading a file

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.1, 2.3
    • Fix Version/s: DEV backlog
    • Component/s: Hub
    • Labels:
    • Testing Instructions:
      Hide

      Download a big course from the community finder:
      => a message saying that the course is downloading with the file size is displayed. Once the course is downloaded the entire page is displayed with a message saying "Finished"

      Publish a course on a hub:
      => same things. A message saying that the course is uploading is displayed. Once finished, the full page is displayed.

      Show
      Download a big course from the community finder: => a message saying that the course is downloading with the file size is displayed. Once the course is downloaded the entire page is displayed with a message saying "Finished" Publish a course on a hub: => same things. A message saying that the course is uploading is displayed. Once finished, the full page is displayed.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
    • Rank:
      27398

      Description

      Do a search in the community finder. From the resul download a course that is quite big. Same computer will not see the message 'File downloading... please wait...". It happens often to people using the php server delivered with the Mac. Apparently flush() is not enough to flush the output buffer to the browser (in order to display the 'File downloading..." message). See http://php.net/manual/en/function.flush.php

        Issue Links

          Activity

          Hide
          Jérôme Mouneyrac added a comment - - edited
          Show
          Jérôme Mouneyrac added a comment - - edited ob_flush is now required: http://php.net/manual/en/function.flush.php
          Hide
          Rossiani Wijaya added a comment -

          Hi Jerome,

          I received the following notice with your patch:
          Notice: ob_flush() [ref.outcontrol]: failed to flush buffer. No buffer to flush. in /blocks/community/communitycourse.php on line 113

          Without the patch, I didn't receive any notice error.

          Show
          Rossiani Wijaya added a comment - Hi Jerome, I received the following notice with your patch: Notice: ob_flush() [ref.outcontrol] : failed to flush buffer. No buffer to flush. in /blocks/community/communitycourse.php on line 113 Without the patch, I didn't receive any notice error.
          Hide
          Rossiani Wijaya added a comment -

          Attaching screenshot after applying patch.

          Show
          Rossiani Wijaya added a comment - Attaching screenshot after applying patch.
          Hide
          Jérôme Mouneyrac added a comment -

          Fixed and retested on Rosie machine. It works well Sending for integration review.

          Show
          Jérôme Mouneyrac added a comment - Fixed and retested on Rosie machine. It works well Sending for integration review.
          Hide
          Sam Hemelryk added a comment -

          Hi Jerome,

          Could you please add a description to this issue about why you are making this change?
          Also have you confirmed that in some circumstances there is output buffering in effect when that code is called, I've had a quick look but could not spot anything.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Hi Jerome, Could you please add a description to this issue about why you are making this change? Also have you confirmed that in some circumstances there is output buffering in effect when that code is called, I've had a quick look but could not spot anything. Cheers Sam
          Hide
          Sam Hemelryk added a comment -

          Adding this to my pile, just waiting on your reply Jerome

          Show
          Sam Hemelryk added a comment - Adding this to my pile, just waiting on your reply Jerome
          Hide
          Jérôme Mouneyrac added a comment -

          Without the change some people don't see a message saying to wait, with it they see it. It depends of your apache configuration.

          Show
          Jérôme Mouneyrac added a comment - Without the change some people don't see a message saying to wait, with it they see it. It depends of your apache configuration.
          Hide
          Sam Hemelryk added a comment -

          OK thanks Jerome, I'm not entirely sure what is loading a output buffer however as this is checking the buffer count I don't see any harm in it going in.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - OK thanks Jerome, I'm not entirely sure what is loading a output buffer however as this is checking the buffer count I don't see any harm in it going in. Cheers Sam
          Hide
          Jérôme Mouneyrac added a comment -

          Thanks Sam

          Show
          Jérôme Mouneyrac added a comment - Thanks Sam
          Hide
          Rajesh Taneja added a comment -

          Works Fine,
          Although while searching for download course following error was encountered.

          Notice: Undefined property: stdClass::$backupsize in /usr/local/www/moodleintegration/blocks/community/renderer.php on line 273 Call Stack: 0.0033 820464 1. {main}() /usr/local/www/moodleintegration/blocks/community/communitycourse.php:0 4.8348 75246528 2. block_community_renderer->course_list() /usr/local/www/moodleintegration/blocks/community/communitycourse.php:236 
          

          Seems to be related to MDL-28093.

          Show
          Rajesh Taneja added a comment - Works Fine, Although while searching for download course following error was encountered. Notice: Undefined property: stdClass::$backupsize in /usr/local/www/moodleintegration/blocks/community/renderer.php on line 273 Call Stack: 0.0033 820464 1. {main}() /usr/local/www/moodleintegration/blocks/community/communitycourse.php:0 4.8348 75246528 2. block_community_renderer->course_list() /usr/local/www/moodleintegration/blocks/community/communitycourse.php:236 Seems to be related to MDL-28093 .
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Some changes to Moodle should be milestones in the project by themselves.

          This is not the case and your fix is not so important, but your collaboration is highly appreciated, thanks!

          Closing as fixed, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Some changes to Moodle should be milestones in the project by themselves. This is not the case and your fix is not so important, but your collaboration is highly appreciated, thanks! Closing as fixed, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: