Moodle plugins directory: edu-sharing Filter | Moodle.org
edu-sharing Filter
Filters ::: filter_edusharing
Maintained by Christian Ernst, edu-sharing Integrations
The edu-sharing filter displays embedded edu-sharing content.
Latest release:
56 sites
321 downloads
4 fans
Current versions available: 3
The edu-sharing filter displays embedded edu-sharing content.
Dependencies
Depends on the edu-sharing activity module. The filter is only needed together the editor plugin.
Installation
Activate the edu-sharing filter, set it up for moodle and html texts and push it to the first position in the filter overview list
For a full documentation with screenshots of the post installation steps for the edu-sharing plugin pakage visit the documentation pages.
Documentation
More information can be found on the homepage.
Where can I get the latest release?
You can download source and binaries from our download page.
Contributing
If you plan to contribute on a regular basis, please visit our community site.
Contributors
Christian Ernst (Lead maintainer)
edu-sharing Integrations
Please login to view contributors details and/or to contact them
http://integration.moodle.org/job/Precheck%20remote%20branch/23128/artifact/work/smurf.html
* Please provide a full description of the plugin. You can describe the plugin's features, purpose and typical usage scenarios there, for example.
* Bug tracker is not specified for your plugin. Providing a place for users of your plugin to report issues encourages participation and provides a way for users to report bugs, make feature requests, or suggest other types of improvements.
* In order to facilitate easier sharing and further development of your open-source plugin, please provide publicly accessible URL of your code repository. The suggested naming convention of the repository is moodle-{plugintype}_{pluginname}.
* Please add a screenshot of your plugin to help folks get an idea of what it looks like when installed.
Thanks Steffen for sharing this filter with the Moodle community. I've been looking at this together with reviewing the edusharing activity module. One thing I noticed is that your filter does a lot of things on all pages by default - such as it tries to prevent the browser from caching them, it includes the module's jQuery and other JS modules and it attempts to connect to the edu-sharing server via SOAP. This all seems to happen on every single page even if there is no edu-sharing contents on it.
I am afraid of potential performance impacts due to such behaviour. I believe it would be much cleaner if the filter's
filter()
method first checked via a quick and checkstrpos()
call that the passed$text
contains a substring likees:resource_id
. It would then perform all the required steps only then, otherwise it would quit early.Such an approach is recommended even for plugins that make much less than your filter does. I am marking this as needing more work now so you can evaluate this and provide a new fixed version. Thanks for your patience with the plugin approval process.
finally i had the time to change this issue. Now the scripts will be loaded only if actually there is some edu-sharaing content in the text.
Hi Steffen, and sorry for the delay in finishing the review of your plugin. There are couple of issues I spotted that should be addressed in a future version.
reset_text_filters_cache()
every time you initialize the filter. As a consequence, your filter effectively switches off all caching for all filters (and even worse, adds some extra processing on top of it). I don't think the filter is supposed to use this function like this.preg_match_all()
is generally much slower thanstrpos()
check. I still think it would make sense to use the latter one first to see if a substring likees:resource_id
is present at all. And only if so, callpreg_match_all()
and gather the actual matches..inner
and is likely to affect other parts of the Moodle interface. Please refer to https://docs.moodle.org/dev/Plugin_contribution_checklist#CSS_stylesSome of these issues are quite serious and normally I would prefer to see them fixed before publishing the plugin here. But I am going to approve this now anyway as the filter is an essential companion of the edusharing set and I believe you will improve it soon. You are cleared to land, welcome to the Plugins directory.