Enhanced File Resource - New Version

Enhanced File Resource - New Version

by Guy Thomas -
Number of replies: 24
Picture of Core developers Picture of Plugin developers

Enhanced File Resource - New Version


A new version of the enhanced file resource has been released.
It addresses an important security issue in the previous version - flash user agents were skipping authentication. This issue is fixed in the new version.
To check your existing version number, inspect the file moodle/mod/enhancedfile/version.php - the version should be 2010030301 or greater.

The following features have been added:

1) Per file security keys for flash uploads
2) File manager (ability to create directories from within resource)

link to module page
Average of ratings: -
In reply to Guy Thomas

Re: Enhanced File Resource - New Version

by Ken Wan -
Good utility !
Sorry, I got the version 2010031200
which should be O.K. but I got the error "Failed to set flash upload keys".

Then I saw your response in its other topic and wonder before I can
use your new version later, is there a getaround at this moment ?

Or shall I fall back for an older version - downloadable from somwhere ?

Thx.

Ken
In reply to Guy Thomas

Re: Enhanced File Resource - New Version

by Mark Pearson -
I got the the 'prerelease version' 2010031700 (22-March-2010) and tested this on two different test Moodle installations.
On a Moodle 1.9.7+ with lib/yui installed for other functionality I got the same error window with a failed security check that others have seen. So I went to Tools -> Error console in Firefox, cleared out all the junk and started again.

I got two major errors and a number of warnings:

Error 1

Error: not well-formed
Source File: http://rublev.lly.earlham.edu/~markp/clamp-LAE/mod/enhancedfile/ajax/makeflashuploadkeys.php
Line: 1, Column: 1
Source Code: {"security_pass":false,"security_checks":[{"mode":1001,"success":true,"messages":null,"checktype":"valid_login","checkval":""},{"mode":1001,"success":false,"messages":{"critical_error":"enhancedfile:multiupload"},"checktype":"has_capability","checkval":"mod\/enhancedfile:multiupload"}],"data":null}

{"security_pass":false,"security_checks":[{"mode":1001,"success":false,"messages":{"critical_error":"You are not logged in."},"checktype":"valid_login","checkval":""}],"data":null}

Error 2

Error: junk after document element
Source File: http://rublev.lly.earlham.edu/~markp/clamp-LAE/mod/enhancedfile/ajax/checkresources.php
Line: 2, Column: 1
Source Code:
<b>Notice</b>: Undefined offset: 1 in <b>/usr/home/markp/public_html/clamp-LAE/mod/enhancedfile/ajax/checkresources.php</b> on line <b>62</b><br />
{"responseok":true}

I repeated the installation into a vanilla Moodle 1.9.8 with no other modules. The Add files worked successfully with no errors or warnings.

Conclusion

Enhanced File Module not currently compatible with other YUI type functionality.

For more details please see Millenial Moodle Issues
I can create a Tracker thingy if that would help.........

Mark the Moodle Czar smile
In reply to Mark Pearson

Re: Enhanced File Resource - New Version

by Elaine Blakeman -

I am having this same problem. Did you find a solution? My files upload but some do not link to the front page. We are using Course Menu (a hacked version).

In reply to Guy Thomas

Re: Enhanced File Resource - New Version

by Mark Chapman -
Guy,

We have downloaded the new version for use at our school. It works great and just want to express our thanks for the time you have spent developing this.

A question that has been raised is the option of uploading the files without them being linked as resources and if it was possible to include this in a future release.

Many Thanks again Guy

Regards

Mark
In reply to Mark Chapman

Re: Enhanced File Resource - New Version

by Larry Elchuck -
Mark : From my limited testing, if you select Directory, I believe that it does what you want (and makes them available but not having them linked as "linked to" resource activities.

Guy: nice job on this plug-in.

2 questions:

1. Can you adapt it to select a folder of "files and folders"? It currently only grabs files and if a transfer has embedded folders, these need to be uploaded separately ... would be great if a folder of resources could be uploaded at the same time (without having to zip it). I realize that this would be more applicable to uploading it to the directory rather than as a "link to" resources.

2. Do you plan to provide a cvs version of the plug-in?

tnx
L
In reply to Larry Elchuck

Re: Enhanced File Resource - New Version

by Rey Ong -
Guy: You've done a great job and it saved my day!

While I am enjoying the features of Enhanced File Resources, however I found some issues which other users might not experience it before:

Case 1: Handles file overwrites with skip or replace options

This check/filter suppose to target the files with same name as the files which you choose to upload.

After few attempts for choosing the same files to upload, it did not show a pop out box to inform users about "File exists, do you want to replace the existing file?" etc kind of message(there might be another option, eg: rename it automatically with underscore_1)

I am not sure about the output of the File Overwrites Check/filter as mine continue to overwrite over the same file with the uploaded file(both sharing same file name)as if the filter not working at all.

Is it just me or there are some glitches?

Please advise.

Utmost thanks to those who can solve my dilemma here!

My moodle specs:

Version: 1.9.5+(going to test on my development server which is 1.9.8)

PHP: 5.3.0

In reply to Rey Ong

Re: Enhanced File Resource - New Version

by Guy Thomas -
Picture of Core developers Picture of Plugin developers
Hi Rey

I've fixed this (literally 2 minutes ago).
Please download the latest version.

Thanks

Guy
In reply to Guy Thomas

Re: Enhanced File Resource - New Version

by Anis Jradah -
Dear Guy,

Thank you for this excellent Module. smile

I have couple of questions and requests.

First, kindly can you guide us where to update or control "file Max size". Also can we limit the accumulated file sizes and not individual file size.

Also can we add delete feature for the list of files uploaded. In other words, if the Instructor wants to remove a file listed he or she cannot.

And the instructor can have the option upload and link files and set them to hide mode.

Thank you again fro creating this Module. :D

Regards,
Anis

In reply to Anis Jradah

Re: Enhanced File Resource - New Version

by Guy Thomas -
Picture of Core developers Picture of Plugin developers
Hi Anis

The "Max size" is controlled by the following:

a) Limits set in your PHP.ini file post_max_size and upload_max_filesize

b) The site level upload limit for your Moodle (Administration > Security > Site Policies Maximum Upload File Size)

c) The course level upload limit specified in each course (Administration > Settings > Maximum upload size)

No you can not set a maximum size for the aggregated uploads

In reply to Guy Thomas

Re: Enhanced File Resource - New Version

by Anis Jradah -
Hi Guy,

Thank you for your quick reply. smile I changed the Maximum upload file size and it is working fine.

my other comment/question is that in the common module settings "Visible". If you select hide for the linked file or files and save and return to course, the files will be linked and shown. Then you have to hide them one by one.

Can this feature be fixed.

Thank you again. :D

Regards.

In reply to Anis Jradah

Re: Enhanced File Resource - New Version

by Amanda Doughty -
Picture of Core developers Picture of Plugin developers

I second the request above. Our Academics are selecting 'hide' and the files are not hidden. This is a major issue for us. I have fixed this for the non-Ajax code but do not know YUI.

In reply to Amanda Doughty

Re: Enhanced File Resource - New Version

by Anis Jradah -

Dear Ms. Doughty,

Kindly can you share with us the code fix for this issue.

Regards,

Anis

 

 

 

 

 

In reply to Anis Jradah

Re: Enhanced File Resource - New Version

by Amanda Doughty -
Picture of Core developers Picture of Plugin developers

Hi Anis,

I have now fixed the Ajax version. I will do some final checks tomorrow and then post the patch.

In reply to Anis Jradah

Re: Enhanced File Resource - New Version

by Amanda Doughty -
Picture of Core developers Picture of Plugin developers

This is a patch for adding the visibility option hide/show

 

It is for version 2010111600

In reply to Amanda Doughty

Re: Enhanced File Resource - New Version

by Guy Thomas -
Picture of Core developers Picture of Plugin developers

Hi Amanda

I'll try and figure this in to a new release soon.

Thanks wink

In reply to Guy Thomas

Re: Enhanced File Resource - New Version

by Anis Jradah -

Dear Guy,

I fixed an issue related to Enhanced file Resource. When you click on the Enhanced File link on the Moodle Navigation bar a white page will be shown and the page will not be rdirected to the course main page.


Please find below the fix:

in the index.php fileadd:


//not to show whitepage when clicking on Enhaced file link on the Navigation bar.
require_once("lib.php");

$id = required_param('id',PARAM_INT);   // course

redirect("$CFG->wwwroot/course/view.php?id=$id");

//

Regrads,
Anis

In reply to Amanda Doughty

Re: Enhanced File Resource - New Version

by Amanda Doughty -
Picture of Core developers Picture of Plugin developers

My previous patch omitted the changes required for IE and flash

In reply to Amanda Doughty

Re: Enhanced File Resource - New Version

by Guy Thomas -
Picture of Core developers Picture of Plugin developers

Thanks Amanda - I've added your changes and uploaded the latest version.

In reply to Larry Elchuck

Re: Enhanced File Resource - New Version

by Guy Thomas -
Picture of Core developers Picture of Plugin developers
Hi Larry

Thank you for your kind words.

In answer to your questions:

1) I don't think so - that is just how the Flash file api works and I also think the HTML 5 file api will work the same.

2) I will provide a cvs version of the plug-in at some point - probably when I have added HTML5 support.

Guy


In reply to Guy Thomas

Re: Enhanced File Resource - New Version

by Guy Thomas -
Picture of Core developers Picture of Plugin developers

A Request From The Developer Not Related To This Module

Recently I bought a LG LCD monitor from CCL computers (based in UK). After about 7 days use I found a cluster of dead pixels near the centre of the screen. I contacted CCL computers who refused to accept a return (even though the monitor was only 7 days old).

Please support my development work by not giving me any donations or beer but by boycotting CCL computers!

I would also ask people who have had the same level of customer service from this company to down vote them in the PC pro awards survey.

https://www.demographix.com/surveys/TWHI-SO67/SH6H9ERL/?ccl

BTW - I contacted LG directly who told me that CCL should accept the return but CCL refused to do so without this in writing from LG!
LG's customer service is excellent but I don't see why I should go through them when the product was reported faulty after just 7 days.
In reply to Guy Thomas

Re: Enhanced File Resource - New Version

by Adma Lim -

I have just download and tried to install it in v1.9.1 and get this error message require_js: yui_json - file not found.

jsonv folder is not found in the v1.9.1 moodle/lib/yui/

but it works on v.1.9.8

In reply to Adma Lim

Re: Enhanced File Resource - New Version

by Guy Thomas -
Picture of Core developers Picture of Plugin developers

v1.9.1 is not supported - v1.9.7+ is supported

Moodle 2 is not supported yet.

In reply to Guy Thomas

Re: Enhanced File Resource - New Version

by Guy Thomas -
Picture of Core developers Picture of Plugin developers

Latest version 2010122100 uploaded today - adds support for resource visibility