Shared folders feature for 1.4 and 1.5

Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
Number of replies: 54
With this package, you can share directories to other courses. You can use shared directories with resource files, resource directories and scorm. To use shared files with HTML editor isn't possible yet (some day you can big grin).

Replace (or add in some cases) these files and go to "Configure variables". You should see many errors because we don't want to replace every table in the database. Only one table (mdl_shared_dir) should be added.

Please notice that you must first enable Shared folders in "Configure variables", because Martin told so wink.

Martin said that it's possible to take this feature to 1.5 but it works with 1.4. I hope that you first put it to the test installation.

Chardelle, don't forget that bottle of whisky clown.


Teemu


Average of ratings: -
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Chardelle Busch -
Picture of Core developers

Thanks for your contributions Teemu. I won't.

I'll test this as soon as I can.  How's your return folder coming along?  Any plans for it?

Chardelle

In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Bernard Boucher -
Hi Teemu,
                good addition to Moodlesmile

Maybe 3 small typos errors in :
moodle/mod/resource/type/directory/directory.html

1 - add  )  before { in line 7
2 - remove php line 8
3 - remove php line 10


7      if (can_use_shared_folders()) {
8            php choose_from_menu($merged_dirs, "reference", $form->reference, 
              get_string("maindirectory", "resource"), '', '');
9      } else {
10          php choose_from_menu($dirs, "reference", $form->reference,  
              get_string("maindirectory", "resource"), '', '');
    }

Thanks for your work,

Bernard

In reply to Bernard Boucher

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
I made the corrections. Here's the new version.


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Gustav W Delius -
I really like this feature and find it very important, given that the DMS integration will still take a while. Could the development please take place inside the moodle CVS? That would make it so much more convenient to test it.
In reply to Gustav W Delius

Re: Shared folders feature for 1.4 and 1.5

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I was hoping for 1.4 but it wasn't quite ready in time ... so 1.5 seems certain.
In reply to Martin Dougiamas

Re: Shared folders feature for 1.4 and 1.5

by Art Lader -

> I was hoping for 1.4 but
> it wasn't quite ready in
> time ... so 1.5 seems
> certain.

Wow, really? That's terrific!

-- Art

In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Jeff Wood -

Teemu,

AWESOME!! Great new feature cool

Just testing it on my test server and it seems to work really well.  I especially like how folders can be shared BUT the folder creator has complete control over content. Courses sharing it only have read access.

I have discovered that when material is shared between courses the person is prompted to "enrol" in the originating course.  E.g.

Course 1 has a file called sample.doc and shares the folder with course 2

A student enrolled in course 2 clicks on a link for sample.doc and is asked to enrol in course 1

Should this happen?

Jeff

In reply to Jeff Wood

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
That should not happen. It didn't happen before but with 1.4 it goes like that. It looks like that something must be done. File moodle/file.php should be modified.I think I can do it today.


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Jeff Wood -

Teemu,

I didn't think so (otherwise they could just enrol in the other course to gain access to the files).

BTW - My test was on Moodle 1.5 development (2004082300) ** same as moodle 1.4 beta??

Jeff

In reply to Jeff Wood

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
But the idea of sharing folders, was that people outside your course could read your files. Now it should work correctly. If people outside your course and outside those courses which are on the sharing list, guess that link, they are asked to enrol (often there's a key of course).

There's one new file (moodle/file.php). I also repaired minor bugs in some files (moodle/mod/resource/coursefiles.php line 926), (moodle/mod/scorm/coursefiles.php line 926) and (moodle/files/index.php line 396).


Teemu
Average of ratings: Useful (1)
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Ger Tielemans -
What if students in the forum of another course guess that link?
In reply to Ger Tielemans

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
A student can see that file only, if student's course is on the list. Otherwise a student is asked to enrol (like when you guess some file link, when you have no rights to see it). The same goes for teacher.


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
I found two bugs in /moodle/files/share.php

One were count_records() function call and the other count_records_select() function call. Both had ASC thing in itangry. It wasn't easy to find, because only the display mode were affected.


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by W Page -
Hi Teemu!

I installed v1.5 Dev and then uploaded the Shared Folders files over the v1.5 Dev files I had previously installed.

I have visited the "Admin" page multiple times but I have not seen anything install.

I do not know if I am doing the right thing or not. 

Is there a "ReadMe" file or Instruction sheet I could look at to see how to activate and use "Shared Folders"?

WP1
In reply to W Page

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
I haven't tested this with 1.5 dev. It looks like it doesn't work there.


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Gustav W Delius -
Hi Teemu, do I remember correctly that your previous version of the new filemanager also allowed student folders? Why did you drop that in this version?
In reply to Gustav W Delius

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
File manager hasn't that feature. I have planned a new tool for that. It's called "Portfolio". Students have 2MB limit. Portfolio can also have links. Links and Files can be shared to course's students and teachers (one by one).


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by W Page -
Hi Teemu,

You are so dedicated to this and making sure the files and functions are up to date and as bug free as possible. Thank you.

Do you think that Martin might let you
  • upload the Moodle+Shared Folders zip you created to CVS?
  • upload the files which need to be changed.

It is my understanding that CVS will allow code to be copied over modified code and not change it. If there is a conflict, it will let one know so the coding can be clarified.

I am setting up a web site this evening just to test out "Shared Folders".

WP1
In reply to W Page

Re: Shared folders feature for 1.4 and 1.5

by Sean S -
I'm using 1.3.4 right now and would like to know if this will work without any problems?

All I need to do is overwrite the various files and then it should work?

Thank-you
In reply to Sean S

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
Don't use this package with 1.3. Resource and Scorm will not work at all. I have 1.3.3 version too but I haven't done 1.3.4 version.


Teemu
In reply to W Page

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
Well I need that tool and I want it to be bug free. Well CVS? Maybe Gustav can answer.


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Gustav W Delius -

This is really up to Martin. He can either decide to put your code straight into the HEAD branch or he may prefer to create a new branch in CVS for your code. In the later case only developers who choose to check out that branch would get your code. We could then test it thoroughly and merge it onto HEAD when everyone is happy. Of course Martin may also decide not to put your code into the main CVS at all but I think that would be a pity.

In reply to Gustav W Delius

Re: Shared folders feature for 1.4 and 1.5

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I've actually been looking at it more closely this past week with a view to putting it in HEAD, but I keep getting called away to little fires.  Hopefully this weekend.
In reply to Martin Dougiamas

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
Please inform me, if you make any improvements. smile


Teemu
In reply to Martin Dougiamas

Re: Shared folders feature for 1.4 and 1.5

by Tim Allen -
Hi  Martin,

Just curious, is this feature still on track to be included in 1.5? 

Currently I use symbolic links to achieve cross-course file sharing, but that causes problems in backup (the shared folders get back up multiple times, as the symbolic links aren't differentiated).  The other solution of putting files in the site files folder is not as secure as I'd like (people can download if they guess the filename).

Thanks a lot in advance for the feedback,  smile
Tim. 



In reply to Tim Allen

Re: Shared folders feature for 1.4 and 1.5

by Genner Cerna -
I totally forgot about this, this will be included?

I wonder if share folder module works on 1.4.3+ anyone tried? Is this module still active?
In reply to Genner Cerna

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
I will continue this next week when data module will be in CVS. I was planning that I will add rights to the files and folders also. Many people like shared folders, so it's possible that it will be included in some future Moodle version. It doesn't work with 1.4.3. The problem is the resource Module. It's not the same as with 1.4.2.

 What do you think Martin? Is it possible that it will be included?
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
hi!

Where can I get the latest source coude? I would like to check it for security issues wink

skodak
In reply to Petr Skoda

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
Well I don't have 1.4.3 version yet. There's no need to check 1.4.2 version. I will send it to you by email when 1.4.3 version is ready. The package is too big to upload here.


Teemu  
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Patt Emmawat -
How to install moodle_file_man.tar.gz
In reply to Patt Emmawat

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
Replace (or add in some cases) these files and go to "Configure variables". You should see many errors because we don't want to replace every table in the database. Only one table (mdl_shared_dir) should be added.

Please notice that you must first enable Shared folders in "Configure variables".

I found some bugs but I can't upload the latest version, because it's over 100 kB. If anybody wants the latest version, please email me.


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Graham Blacker -

Hi Teemu

This looks great. However we are looking to be able to have a resource of materials that can be shared across a number of courses and available to students from within their courses. On my test server, running Moodle 1.4, only the teachers can see the shared resources. Is it possible for students to access the shared resource?

Also is it possible to have a copy of the latest version? Your parent message suggests emailing you, but I do not have your email address.

Thanks for your great work.

Graham

In reply to Graham Blacker

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
It's teemu.sumi@jippii.fi.

Only the newest version of shared folders works properly.


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by W Page -
Hi Teemu,

When you say "newest version of shared folders works properly"  you mean "works properly" with v1.4.x not v1.5 right??

WP1
In reply to W Page

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
I will test it with 1.5. I don't know yet if it works.


Teemu



In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
It doesn't work with 1.5 Dev. I will make it work with actual 1.5 but it's too early to do something about it.


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
There's  new 1.4.1 version available. Please email me, if you want it. It's over 100 kB, so I can't upload it.

Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Wayne Gaish -
Hi - have tested you original file sharing and was most impressed. I have now come to implement using moodle 1.4.3 and am having probs. Before I get to involved, you suggest there is another version?  Please could you send it to me, My teaching staff are keen to be able to share files between courses. We also have a problem and will look into limiting the course list. This is because we have some 3,000 courses and as you can imagine the list is quite long. We thought we might limit be category ? any thoughts

kind regards

Wayne
In reply to Wayne Gaish

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
I will make the 1.4.3 version. I can start the work next monday. There's big problem with resource module.


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Genner Cerna -
Does this mean that shared folders feature will be included in the release of moodle 1.5 on february, I mean officially will be inluded in the distribution?
In reply to Genner Cerna

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
I hope so but Martin decides that.
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
IMO it would be best to place it in contrib first. The original code I see above will have to rewritten, because the file handling in 1.5dev was changed - I am planning some more improvements before 1.5 goes beta. The handling of uploaded files in 1.4.3 is considered obsolete, we are fixing only serious security issues there.

How will be solved backup? I am sure people will expect it to work when transfering courses from site to site.

skodak
In reply to Petr Skoda

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
I don't make 1.4.3 version at all. I'll go directly to 1.5. I learned how backups work when I was doing data module. During restoring procedure there could be a switch where you tell wheter the original course ( which shared the folders to backupped course) appears on the same server as the new course. If the original course doesn't exist, the shared folders will be just ordinary folders.

Have you planned any surprises which make that difficult Petr?
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Have you planned any surprises which make that difficult Petr?

No! I just changed the file.php to handle file access security a bit. It should be much easier to implement than before smile
In reply to Petr Skoda

Re: Shared folders feature for 1.4 and 1.5

by Genner Cerna -
Its good to know that I will be able to make it on 1.5 version.
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Hans de Zwart -

Hello Teemu,

If I have a lot of resources (about 500MB of PDF's) that I would want to have available in a number of courses would shared folders be a solution for me?

What exactly would happen if I made a backup of course with references to the shared folder. Will they work? Without unnecessarily (where is aspell when you need it? I have no idea whether I spelled that word correctly) replicating the data in the folder?

Is this feature still on track for inclusion in 1.5? Or am I asking you a question that you also do not know?

Apologies for my bombardment of questions...

[Edit:] Just looking around some more. Would metacourses help me at all? Over to my moodle 1.5 dev test site...

In reply to Hans de Zwart

Re: Shared folders feature for 1.4 and 1.5

by Hans de Zwart -

I now see that metacourses will not solve my problem. The courses that are enrolled in the metacourse are not allowed to see its files.

I am really looking for something that uses something like symbolic links to a collection of files (within the Moodle GUI) so that the course can be cloned without enlarging the diskspace used.

Am I correct in understanding that this is not possible now? 

In reply to Hans de Zwart

Re: Shared folders feature for 1.4 and 1.5

by Genner Cerna -
Just wondering if this module will be in moodle 1.5?

Teemu I dont  think its included in 1.5?
In reply to Genner Cerna

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
It's not in standard 1.5.


Teemu
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by André Krüger -
Picture of Core developers
Shared folders in combination with symbolic links is a very great feature for me. All documents can be stored in one course and teachers can make a choice which documents, they want to share with others.

I hope this feature will be in standard in 1.6.

I can't find latest version in cvs. Where can I find it ?

Thanks for your great work, Teemu.

Andre
In reply to André Krüger

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
Latest version is for 1.4.2. It doesn't work with 1.4.5 or 1.5. I will introduce the next version when 1.5.1 comes.


Teemu
In reply to Hans de Zwart

Re: Shared folders feature for 1.4 and 1.5

by Teemu Sumi -
Backupping doesn't work. I think that with 1.6 version it will work. You can make one shared folder and put all your files there. You can give read only rights to several courses easily.
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Genner Cerna -
This is sad to know Teemu... sad

Hope you'll find a better way in addressing to this problem. Hope to hear more for you. By the way, very nice module indeed but not yet ready to implement it a part of moodle.

Your the man! Teemu!
In reply to Teemu Sumi

Re: Shared folders feature for 1.4 and 1.5

by Hans de Zwart -
That sounds great! One day 1.6 will be there!

It is very interesting to see what the future of file management will be in new versions of Moodle. Many thing are halfway and/or overlapping: shared folders, myfiles block, metacourses, the DMS, ...

I hope there will be a unified direction soon that takes the best out of all of these!