## Repositories: Sharedresources Library

repository_sharedresources
Maintained by Valery Fremaux
A repository view of sharedresources file pool so they can be used in other context calling for files inclusion.
27
193
2

This component completes the sharedresource ensemble by allowing using sharedresource
in other contexts than simple publishing sharedresource entries with sharedresource
module activities.

It provides a standard Repository upon the sharedresource pool so they can be browed
from a file_picker or a file browser GUI. When using file pickers or file browsers,
the sharedresource record will be duplicated and relocalized to the calling context
(virtual copy), unless the caller has an explicit aliasing strategy.

Status of developement :
============================

This repository is yet in an intermediary state. We would like files to be presented
using metadata classification based browsing and not just file storage. Shared resources
are actually not organised into folder in the storage, but as flat folder (no phyisical
hierarchy) as organisatio hierarchy is usually provided by metadata (typical :
Node 9 : Classification in LOM model). There should be some provision to get one day
the Library search engine integrated in the repo so files could be searched here
agains same sorting criteria than in the Library front end.

### Sets

This plugin is part of set Shared resources module package.

### Contributors

• Tue, Jun 4, 2013, 11:54 AM
Thanks for taking the time to share this with the community. This installed and ran fine.
• Sat, Dec 7, 2013, 4:31 AM
Hi Valery, I just installed this plugin in Moodle 2.6. When I go to edit a course, I get the following error message:

get_course_context() is deprecated, please use $context->get_course_context(true) instead.•line 4387 of /lib/deprecatedlib.php: call to debugging() * line 191 of /repository/sharedresources/lib.php: call to get_course_context() * : : : : : The solution is to make the following change on line 191 of /repository/sharedresources/lib.php Was: return get_string('sharedresources', 'repository_sharedresources') . format_string($course->shortname, true, array('context' => get_course_context($context))); Change to: return get_string('sharedresources', 'repository_sharedresources') . format_string($course->shortname, true, array('context' => \$context->get_course_context(true)));

Hope this helps!

Michael Milette
• Fri, Mar 28, 2014, 1:27 AM
Hi Valery,

I am trying to uninstall this plugin but unfortunately there is no uninstall link in Moodle 2.6's plugin manager. Is there a way to uninstall it?

If I just delete the files, Moodle doesn't complain that it can't find the plugin.

Best regards,

Michael
• Fri, Mar 28, 2014, 1:39 AM
unlike all other plugin class i am not really sure repository implementation need to be "uninstalled" actually.
• Fri, Mar 28, 2014, 1:45 AM
I've disabled the plugin but can't remove the files. As soon as I do, the plugin shows up in the Notifications page with a message about the files being "missing from disk!".

You are correct that none of the other repository plugins have an uninstall option either which really surprised me. If that is the case, what is the process for removing a repository plugin once it has been installed?
• Fri, Mar 28, 2014, 1:56 AM
FYI - Just came across this....

According to https://tracker.moodle.org/browse/MDL-39087, all types of plugins should be uninstallable since Moodle 2.5.
• Fri, Mar 28, 2014, 2:35 AM
Seeking fot hat kind of conditions :
The 'Uninstall' link should never appear for plugins that are required by some other plugins

I reviewed dependancies that seems not be the issue.

I checked a 2.5 install where the "uninstall" link is clearly visible in the global (full table) plugin manager....
• Fri, Mar 28, 2014, 2:49 AM
By the way, the repository plugin as wrapper for sharedresource is yet unachieved... could be till the summer if workload allows it....