{"id":19591944,"url":"https://github.com/catalyst/moodle-tool_redirects","last_synced_at":"2025-04-27T14:33:32.931Z","repository":{"id":66891654,"uuid":"118689236","full_name":"catalyst/moodle-tool_redirects","owner":"catalyst","description":"An admin tool enabling easy setup of redirects from inside Moodle","archived":false,"fork":false,"pushed_at":"2025-03-27T04:35:07.000Z","size":51,"stargazers_count":8,"open_issues_count":9,"forks_count":7,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-05T00:41:24.683Z","etag":null,"topics":["moodle","moodle-plugin","redirect","redirect-urls"],"latest_commit_sha":null,"homepage":"https://moodle.org/plugins/tool_redirects","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catalyst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-24T00:34:12.000Z","updated_at":"2025-03-27T04:35:09.000Z","dependencies_parsed_at":"2023-07-17T04:15:08.228Z","dependency_job_id":"80a7ee1c-954e-41da-b338-f8a23012ac9a","html_url":"https://github.com/catalyst/moodle-tool_redirects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle-tool_redirects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle-tool_redirects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle-tool_redirects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle-tool_redirects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catalyst","download_url":"https://codeload.github.com/catalyst/moodle-tool_redirects/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251154640,"owners_count":21544533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["moodle","moodle-plugin","redirect","redirect-urls"],"created_at":"2024-11-11T08:32:08.274Z","updated_at":"2025-04-27T14:33:32.918Z","avatar_url":"https://github.com/catalyst.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://github.com/catalyst/moodle-tool_redirects/actions/workflows/ci.yml?query=branch%3Amaster\"\u003e\n\u003cimg src=\"https://github.com/catalyst/moodle-tool_redirects/workflows/ci/badge.svg?branch=master\"\u003e\n\u003c/a\u003e\n\n# Configurable redirects for Moodle\n\nA very simple plugin which allows admin to set redirects based on url. Redirects can\nbe from existing Moodle pages like from one course to another, or they can be 'vanity'\nurls from non existing urls into a page inside Moodle.\n\n## Branches\n| Moodle version    | Branch                                                                  | PHP  |\n|-------------------|-------------------------------------------------------------------------|------|\n| Moodle 4.1+       | [master](https://github.com/catalyst/moodle-tool_redirects/tree/master) | 7.4+ |\n\n## Installation\n\nStep 1: Install the local module\n--------------------------------\n\nUsing git submodule:\n\n```\ngit submodule add git@github.com:catalyst/moodle-tool_redirects.git admin/tool/redirects\n```\n\nOR you can download as a zip from github\n\nhttps://github.com/catalyst/moodle-tool_redirects/archive/master.zip\n\nExtract this into /var/www/yourmoodle/admin/tool/redirects\n\nThen run the moodle upgrade as normal.\n\nhttps://docs.moodle.org/en/Installing_plugins\n\n\nStep 2: Apply core patches\n-------------------------------\n\nThis plugin requires [MDL-66340](https://tracker.moodle.org/browse/MDL-66340), which was added in 3.8.\n\nYou can easily backport these patches in one line for 3.5, 3.6 and 3.7:\n\nFor Moodle 3.5:\n\n```\ngit apply --whitespace=nowarn admin/tool/redirects/patch/core35.diff\n```\n\nFor Moodle 3.6:\n\n```\ngit apply --whitespace=nowarn admin/tool/redirects/patch/core36.diff\n```\n\nFor Moodle 3.7:\n\n```\ngit apply --whitespace=nowarn admin/tool/redirects/patch/core37.diff\n```\n\n### Manual cherry-pick\nIn case the patches do not work due to an update to older Moodle branches (such as security updates), you can manually perform the cherry-picks.\n\nFor [MDL-66340](https://tracker.moodle.org/browse/MDL-66340):\n\n```\ngit cherry-pick 4ed105a9fd4c37e063d384ff155bd10c3bfbb303\n```\nIf there are merge conflicts, ensure the lines that you are adding are consistent with the lines being added inside the patch files. Everything else can safely be ignored.\n\nOnce this has been performed, you can generate your own patch files using `git format-patch`. An example for Moodle 3.5 is below:\n```\ngit format-patch MOODLE_35_STABLE --stdout \u003e admin/tool/redirects/patch/new_core35.diff\n```\n\n## Configuration\n\n* Navigate to Site Administration \u003e Plugins \u003e Admin tools \u003e Redirects\n* Add rules. Each line should be a redirect rule like [php regex of local moodle URL to redirect from]=\u003e[any URL to redirect to]. E.g. #/my/#=\u003e/course/view.php?id=2 \n* Enable or disable redirects for administrators\n\nIf you wish to use redirects for urls which do not exist, eg /some-vanity-url then your webserver\nneeds to be configured to have Moodle handle error pages. Setup details are here:\n\nhttps://docs.moodle.org/dev/Error_pages\n\n## Backdoor option for Admins\nAdmins can bypass redirect by adding **noredirect=1** parameter to requested URL. E.g. http://moodle.example.com/my/?noredirect=1\n\n# Contributing and Support\n\nIssues, and pull requests using github are welcome and encouraged!\n\nhttps://github.com/catalyst/moodle-tool_redirects/issues\n\nIf you would like commercial support or would like to sponsor additional improvements\nto this plugin please contact us:\n\nhttps://www.catalyst-au.net/contact-us\n\n\n# Crafted by Catalyst IT\nThis plugin was developed by Catalyst IT Australia:\n\nhttps://www.catalyst-au.net/\n\n\u003cimg alt=\"Catalyst IT\" src=\"https://cdn.rawgit.com/CatalystIT-AU/moodle-auth_saml2/master/pix/catalyst-logo.svg\" width=\"400\"\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalyst%2Fmoodle-tool_redirects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatalyst%2Fmoodle-tool_redirects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalyst%2Fmoodle-tool_redirects/lists"}