Moodle

Improved file upload dialog

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.7, 1.7.1
  • Fix Version/s: None
  • Component/s: AJAX
  • Labels:
    None
  • Affected Branches:
    MOODLE_15_STABLE, MOODLE_16_STABLE, MOODLE_17_STABLE

Description

Please see this thread: http://moodle.org/mod/forum/discuss.php?d=62888

Would it be possible to improve the file upload dialogue slightly? I suggest something simple - perhaps have it display a "Please wait - file uploading" message while a file uploads and to have the upload button disabled for the duration.

I've seen teachers get confused while a large file uploads, as there is no feedback to indicate Moodle is actually doing anything.

I know that this is the normal way file uploads work on web pages, so that's why I suggest a bit of AJAX (well, HIJAX) to keep the user informed (if they have javascript turned on).

Issue Links

Activity

Hide
Martin Dougiamas added a comment -

Assigning to me temporarily because Vy-Shane no longer works for Moodle HQ.

Show
Martin Dougiamas added a comment - Assigning to me temporarily because Vy-Shane no longer works for Moodle HQ.
Hide
guy thomas added a comment -

Pure AJAX using the javascript http transport is not going to cut it.

I've looked into file upload progress for another project. The problem with PHP is that there is no easy way to query the upload progress of a file currently uploading- unless the PHP APC (alternative PHP cache) module has been installed.

Also, you have to write hidden iframes to the page and then move your upload fields into them when the user clicks upload. These hidden iframes are used simply to report success back to javascript once the file has uploaded. Why use iframes? Well, the javascript http transport does not let you send files! Pure AJAX only allows for standard form fields.

I have experience with this and have actually bullied PHP into giving me file upload progress in another project. I've even created a file uploader that lets you keep adding files to the upload queue and you can see the progress of individual files (even APC wouldn't do this without lots of extra PHP code).

Another issue with the file upload in Moodle (HTML4) is that only one file can be selected for upload each time. This is not actually a design flaw with Moodle but a limitation of HTML 4. However, it is possible to provide users with multiple file selections for upload by using Flash.

See the following blog:

http://dy-verse.blogspot.com/2007/09/selecting-multiple-files-for-upload.html

Show
guy thomas added a comment - Pure AJAX using the javascript http transport is not going to cut it. I've looked into file upload progress for another project. The problem with PHP is that there is no easy way to query the upload progress of a file currently uploading- unless the PHP APC (alternative PHP cache) module has been installed. Also, you have to write hidden iframes to the page and then move your upload fields into them when the user clicks upload. These hidden iframes are used simply to report success back to javascript once the file has uploaded. Why use iframes? Well, the javascript http transport does not let you send files! Pure AJAX only allows for standard form fields. I have experience with this and have actually bullied PHP into giving me file upload progress in another project. I've even created a file uploader that lets you keep adding files to the upload queue and you can see the progress of individual files (even APC wouldn't do this without lots of extra PHP code). Another issue with the file upload in Moodle (HTML4) is that only one file can be selected for upload each time. This is not actually a design flaw with Moodle but a limitation of HTML 4. However, it is possible to provide users with multiple file selections for upload by using Flash. See the following blog: http://dy-verse.blogspot.com/2007/09/selecting-multiple-files-for-upload.html

People

Dates

  • Created:
    Updated: