Filters: GURLS

Maintained by Picture of NED SupportNED Support
This plugin will dynamically replace a URL (example: with an alternate URL (example: based on front page group membership. More info here:
3 sites
3 fans

This plugin will dynamically replace a URL (example: with an alternate URL (example: 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  Within this instance, the Red Group is associated with and the Blue Group with

This means that when members of the Red Group come across any page that contains the URL, they will see their alternative URL Accordingly, members of the blue group will see 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, could be a server in Brazil and could be a server in China. 


Here is how the interface works:


Screenshot #0


Picture of NED Support
NED Support (Lead maintainer)
Picture of Fernando Oliveira
Fernando Oliveira: Original maintainer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Plugins bot
    Thu, Aug 27, 2015, 7:22 PM
  • Picture of David Mudrák
    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
    • The styles.css files contains suspicious style definition, not related to your filter with possible side effects - see
    • 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.

  • Picture of Fernando Oliveira
    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.
  • Picture of David Mudrák
    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.

  • Picture of David Mudrák
    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.

  • Picture of David Mudrák
    Wed, Oct 14, 2015, 7:52 PM

    Hi Fernando. Please find my comments in your bug tracker.

Please login to post comments