I got file sharing to work in MyFiles/FileManager with Moodle 1.8
I have been using Moodle for a while but was never active on this forum. I am doing a PowerSchool & Moodle integration for my client in Thailand. One of the requirements is to share files between students & teachers. I had played with the MyFiles block last year in a pre-1.8 Moodle release and it worked fine. Now, I am setting up my client's server Moodle 1.8 and MyFiles is not working with the file sharing feature. I spent almost a day today to get it to work (by now, I know the Moodle backend DB very well from my PowerSchool integration experience and it helps).
I have modified 3 files namely, print_lib.php, lib.php and sharing.php. You can find all my changes if you search for my initial "DWT" in these files. Can someone take a look at it and see if all the sharing functions are working properly. Please download the hacked/patched version from here:
http://www.opensolutionsasia.com/david/file_manager_dwt_18hack_022408.zip
Whoever manages the source tree, you are welcome to put it in as an official change. I have commented things I did that should be done more properly in the code.
Honestly, this block can use a lot of enhancements. I have all the necessary skills (17 years in software development/consulting) to help but time is lacking though.
Regards,
David Tong
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Regards,
David
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
But, I would suggest you keep the global site sharing off which is the default behavior. If I have time I would rewrite the whole global site sharing feature, it is simply too cumbersome in the current stage. How about some funding here? Just kidding.
David
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Hi David
Well done for getting MyFiles working with Moodle 1.8 (We've been waiting for ages for this)
Before I test your module can you answer a question:-
Does it work with Moodle groups i.e can separate groups see separate private file storage areas?
I ask this as I'd like to use MyFiles for student file storage for team projects and would like to ensure one team can't see the other team's files.
Thanks again
Clive
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
The short answer is no, it does not work with groups. I noticed it when I was modifying the DB queries.
I don't think the original code was written for groups and it was all course based. My client also uses groups so I'll take a look for a quick fix if possible.
For your environment, can't you just share files with one particular team by selecting the team members only? When sharing a file, you have the option to share it to all course members or share it to any number of selected members. It should work but a little cumbersome.
Regards,
David
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
I have tried to install the hacks, however sharing is still not possible.
When i select the "sharing" option, i could not see the list of students/users which i can share to even though there are users in the same course.
Will appreciate for any help possible.
Thanks,
Andy
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Please provide more details. Which "sharing" option are you talking about and how did you get to the page with the "sharing" option? Screen shots with comments would be nice.
Also, in the same course you were trying to perform file sharing, click on the "Participants" link (usually on the top left corner of the course page. Do you see the page filled with students and teacher(s)? On this "participants" page, in "Current role", do you see "Teacher " and "Student"? If you select "Student" from "Current role", do you still see a long list of accounts?
Another thing is if you use customized system roles instead of the default Moodle Teacher and Student roles then file sharing would break and you would not be able to see any users when you want to share your files. To check this, you have to be the administrator, go to the top level home page, click Users->Permissions->Assign system roles, you should see a list of roles. Do you see the "Teacher" and "Student" role? Do these 2 URL links contain roleid=3 for "Teacher" and roleid=5 for students?
Last thing, get the latest version of MyFiles from the same link I provided earlier. I did made some changes within one hour after I did the first upload. I didn't think anyone would have downloaded the original package soon after I posted my first message. I learned assumption is bad on my very first job but see what I am doing again .
Regards,
David
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
I'll get a new fix either today or tomorrow and I'll let you all know. This is fun stuff!
Regards,
David
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
http://www.opensolutionsasia.com/david/file_manager_dwt_18hack_030108.zip
Cheers,
David
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
-Luciano
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
I haven't tested my fix in 1.9. You are welcome to copy my fix http://www.opensolutionsasia.com/david/file_manager_dwt_18hack_030108.zip to your blocks/file_manager directory and see does it work in 1.9. Please let us know how it turns out.
Regards,
David
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
I haven't tested extensively, but so far this fix works in my 1.9 installation.
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
-Luciano
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
I think I have seen the problem myself too and I know exactly what you are talking about. It was a minor problem and I have forgotten it in the process of making the main features to work again. I'll try to fix it in a week or 2 and I'll let you guys know.
Cheers,
David
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
David,
Thanks for your quick response. I'm glad it is something that has been duplicated (always nice to know I'm not the only one experiencing this). Students are happy to have My Links back and look forward to your next release.
Alan
回應: Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Re: 回應: Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
My fix was implemented after the 1.9 release therefore I don't think it is in 1.9. Anyway, take this http://www.opensolutionsasia.com/david/file_manager_dwt_18hack_030108.zip and copy the files directly into your block/file_manager folder. No need to uninstall and reinstall since there was no DB changes therefore a direct file copy would get you the latest working file manager.
To the rest of the Moodlers, I have been tied up with my work and had no time to work on the file manager. Hopefully, in 2-3 weeks, I'll fix the link issue and also do a CVS cleanup for file manager. I'll keep you posted.
Regards,
David
Re: 回應: Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
I was just curious if you had gotten a chance to fix the link issue.
Thanks in advance,
Jeff
Re: 回應: Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
"You cannot view this file!"
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Hi, is it possible to have the file manager block course-independent?
I.e. for a file repositry for students, whatever course they are in? I am thinking about using this block as a 'exemplar' repositry for work students want to show off to anyone else, irrespective of courses. However, I note from the code that there are many references to courses (ids etc).
Thanks for your time with this post, and the project as a whole.
Charles.
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
I just tried this on the latest version of 1.9 and the install (DB tables etc.) went without issue but when I create the block on the front of my site (or in a course) and set everything (file uploads, file sharing, security) and then try to access the manager by clicking on "MyLinks" I get the following error message:
The Link Manager has been Disabled!
Just curious if there has been any further work on getting this up and running under 1.9?
Jason
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
For the "The Link Manager has been Disabled" error, if you open lib.php in your favorite php editing software (Dreamweaver in my case) and edit line 575 as follows:
if ($tmp->enable_fmanager == 0) {
to
if ($tmp->enable_fmanager == 1) {
The "The Link Manager has been Disabled" error disappears and the block seems to function....as admin at least. Admittedly, I have absolutely no idea what the if clause is checking for so this is not a "fix" by any means. Just experimenting in the hopes that I'll learn something
Jason
P.S. Just checked and this 'ignorant' modification makes the "The Link Manager has been Disabled" error appear for students....
P.P.S. But, changing the value from 1 to 2 makes it work for both admin and students. Ok, I guess I need to spend some time and see what this if clause is checking for huh....
**WARNING** The change in P.P.S. makes the file manager work in 1.9 but you cannot disable the file manager from >security>admin settings>"Enable the file manager">No
I'm just documenting my experimentation.....in real time
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
This seems like a very very useful tool for our staff development and collaboration! However, it would be great if that problem could get fixed.
Also, I want to be able to allow/disallow certain people or certain roles access to this file manager or permissions to upload/download the files.
Any help would be great! This tool seems great!
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
I just found out that our 1.9.8 install of MyFiles (with the 0 to 2 modification) does work in Safari and Chrome but not in Firefox. Anyone have the same situation?
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Does this My Files/File manager also work in 2.x???
Or do you guys know another solution for groups who want to have an easy way of file sharing?
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
I'm integrating File manager and its working fine with the "f_manager == 2" tweak. I was wondering if there is a new version of File manager with that problem fixed??
Also, is it possible for a teacher to use the files in his/her Mylinks to use as resource in a course??
I apologize if am asking any stupid questions because i'm new to Moodle.
Thanks.
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Another one working here on 1.9 - One slight annoyance tho is that when visiting sharing.php the page stretches to fill the screen (my theme isn't a full screen theme), which doesn't look too nice. None of the other pages do this?
Cheers
Alex
Re: I got file sharing to work in MyFiles/FileManager with Moodle 1.8
Hi Sir, Can i ask for help? We're currently added the file manager block to our moodle 1.9. And i noticed that after clicking the "Share to others!" icon and redirected to http://..../blocks/file_manager/sharing.php?id=14&groupid=0&linkid=14&from='link'&rootdir=0
the list of users were being shown.
Some of our users are complaining that it is quite hard for them to look for names of users to share their files with..
Since i do not enough knowledge to understand the php codes you have made. I am humbly asking for your help.
Is there a way that we can make the list alphabetically? or integrate an sorting option or seach area? thank you in advance.