## Filters: GURLS

filter_gurls
Maintained by Toby Wingfield
This plugin will dynamically replace a URL (example: www.black.com) with an alternate URL (example: www.blue.com) based on front page group membership. More info here: http://northernlinks.ca/docs/GURLS_Manual.pdf
1 sites
3 fans

This plugin will dynamically replace a URL (example: www.black.com) with an alternate URL (example: www.blue.com) based on front page group membership. Consider this example:

A Moodle site has a grouping named “SWAP” and this grouping contains two groups: Red Group and Blue Group. Using the GURLS filter, the admin creates a swap instance for the URL www.black.com.  Within this instance, the Red Group is associated with www.red.com and the Blue Group with www.blue.com.

This means that when members of the Red Group come across any page that contains the URL www.black.com, they will see their alternative URL www.red.com. Accordingly, members of the blue group will see www.blue.com. This plugins can be used for different purposes, but it was originally created to serve large media files from a server that is closest to the user. In the example illustrated below, www.red.com could be a server in Brazil and www.blue.com could be a server in China.

### Contributors

Fernando Oliveira: Original maintainer

• Thu, Aug 27, 2015, 7:22 PM
• Thu, Aug 27, 2015, 9:04 PM

Hi Fernando. Thanks for sharing another plugin with the Moodle community. Prior to approving this filter here, there are couple of issues that should be fixed.

• Both 'Source control URL' and 'Bug tracker URL' lead to your site. However, I can't see there where the actual source code and/or the bug tracker is supposed to be found. So I can't easily report issues detected while reviewing the code. Additionally, it does not see right to force every user of your plugin to create an account at your site to report issues. Github with its per-repository issues tracker is the most favourite option for most Moodle plugins developers these days, and it integrates with this Plugins directory quite nicely.
• See https://docs.moodle.org/dev/Plugin_contribution_checklist#Boilerplate
• The styles.css files contains suspicious style definition, not related to your filter with possible side effects - see https://docs.moodle.org/dev/Plugin_contribution_checklist#CSS-styles
• What is the purpose of the help_text string?
• There is 1 as the hard-coded value to obtain the front page at several places. You should use the SITEID constant as it does not always equal 1. There is also get_site() core function, should you need it.
• There are some form fields with the type PARAM_RAW used. It is better to use more specific PARAM type, if possible, or at least make sure the appropriate function is used when displaying such raw values (such as s() or format_string()).
• Is it needed to make use of groupings? Could cohorts work better maybe?

For now, I am marking this as needing more work to get things fixed and/or clarified. Thanks for you patience with the review and approval process.

• Fri, Sep 11, 2015, 11:00 PM
Hi David, these issues are resolved in latest version. Groupings is used instead of cohorts because cohorts do not have a hierarchical structure.
• Tue, Sep 15, 2015, 8:16 PM

Hi Fernando. Thanks for providing a new version that fixes many of the reported issues. I gave the filter another round of review and spotted some additional issues (now reported in your bug tracker) that should be fixed yet.

Please note, you should ideally bump the version number (at least $plugin->version but I prefer $plugin->release too) when uploading a new version here - even though the plugin is not approved yet.

• Sat, Oct 3, 2015, 10:35 PM

Hi again. The plugins team is currently busy with other development tasks for the upcoming Moodle 3.0 release, so please expect delays in the review and approval process. Thanks for your understanding and patience, we will do our best to get to reviewing your plugin soon.

• Wed, Oct 14, 2015, 7:52 PM