Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Section
Column
width65%

Overview

Fluid's Uploader can be integrated into a learning content management system, such as ATutor.  Files are uploaded for several purposes such as uploading images for teaching material, student-submitted assignments, and audio tutorial files.  The integration of Fluid's Uploader improves the user experience by allowing for multiple file uploads along with the progress bar and pause/resume features.  ATutor aims to integrate Fluid's Uploader into its File Manager and have it ready for its next release (ATutor 1.6.2).

Implementation

Fluid's Uploader script is called by the File Manager which is used in several places in ATutor, such as:

(logged in to an instructor account)

  • Manage -> File Manager
  • Content Editor -> File Manager
  • Manage -> Tests -> Edit -> File Manager

Starting from ATutor 1.6.2, the entire source code of the Fluid Package is installed under /jscripts/fluid-components in the ATutor installation directory.  In previous releases, only files from /fluid-components/js of the Fluid Package were installed directly in /jscripts and did not include folders such as /css and /swfupload.

Initialization

When using the Fluid scripts, they need to be loaded and initialized in the header of a page.  This is done by saving the necessary tags to the $_custom_head variable (in /tools/filemanager/index.php), which gets passed to /tools/filemanager/top.php to be written from the appropriate header include file.  Most of the HTML code being used is borrowed from the sample-code provided by the Fluid Package in /sample-code/uploader/inline/uploader.html with changes made to paths and settings.

Column
width35%
Panel
borderStyle
borderColor#566b30
bgColor#fff
titleBGColor#D3E3C4
borderStylesolid
titleOn this Pagesolid
Table of Contents
minlevel2
Panel
borderColor#321137
bgColor#fff
titleBGColor#c1b7c3
borderStylesolid
titleSee Also
borderStylesolid
Panel
borderColor#321137
bgColor#fff
titleBGColor#cccccc
borderStylesolid
titleStill need help?borderStylesolid

Join the fluid-talk mailing list and ask your questions there.

Screenshots

...

For a more detailed reference of settings that can be configured for the Uploader, please refer to the Uploader API Wiki page.  

Display

After initializing the Fluid scripts, the Uploader gets displayed through /include/html/filemanager_display.inc.php.  Most of the HTML code being used is borrowed from the sample-code provided by the Fluid Package in /sample-code/uploader/inline/uploader.html

...

In the current implementation, a Flash detection script gets inserted into the header when a user initially accesses any page on ATutor.  The script returns a value of "yes" or "no", which gets saved in a cookie ($_COOKIE[fluid:"flash"]) then sent to the server to be saved as a session variable ($_SESSION[fluid:'flash']).  Once the session variable is set, the cookie is removed and the Flash detection script no longer gets called for the remainder of the session.  When accessing the filemanager, the php script (/include/html/filemanager_display.inc.php) generates the appropriate uploader depending on the value of the session variable.

...

Panel
bgColorwhite
titleBGColor#c1b7c3
borderStylesolid
titleInteraction DesignborderStylesolid