Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-82565

Add support for routing of regular pages

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_500_STABLE
    • MDL-82565-main
    • Hide
      1. Configure the router per the instructions at https://docs.moodle.org/405/en/Configuring_the_Router
      2. Restart Apache or php-fpm as required
      3. Edit lib/templates/full_header.mustache to add the following straight after the the core/welcome inclusion:

                        {{#settingsmenu}}
                            <div class="me-auto">
                                {{{settingsmenu}}}
                            </div>
                        {{/settingsmenu}}
        

      4. Navigate to your site
      5. Log in
      6. Navigate to a course
      7. You will see a weird dropdown just before "Bulk Actions" - > Open it
      8. Mouse over the "More..." link
        1. Confirm that the URL is /course/[courseid]/manage
      9. Click on the "More..." link
        1. Confirm that the page loads
      Shims
      1. As an admin, enter the URL <YOUR_SITE_URL>/course/admin.php?courseid=<course_ID> on your browser.
      2. Confirm that you are redirected to <YOUR_SITE_URL>/course/<course_ID>/manage
      3. Enter the URL <YOUR_SITE_URL>/course/tags.php?id=<course_ID>
      4. Confirm that you are redirected to <YOUR_SITE_URL>/course/<course_ID>/tags
      5. Log out and log in as a student and enter the URL <YOUR_SITE_URL>/course/tags.php?id=<course_ID>
      6. Confirm that you get an error saying you don't have permission to change course tags.
      Show
      Configure the router per the instructions at https://docs.moodle.org/405/en/Configuring_the_Router Configuring Apache2 Configuring Moodle Restart Apache or php-fpm as required Edit lib/templates/full_header.mustache to add the following straight after the the core/welcome inclusion: {{#settingsmenu}} <div class="me-auto"> {{{settingsmenu}}} </div> {{/settingsmenu}} Navigate to your site Log in Navigate to a course You will see a weird dropdown just before "Bulk Actions" - > Open it Mouse over the "More..." link Confirm that the URL is /course/ [courseid] /manage Click on the "More..." link Confirm that the page loads Shims As an admin, enter the URL <YOUR_SITE_URL>/course/admin.php?courseid=<course_ID> on your browser. Confirm that you are redirected to <YOUR_SITE_URL>/course/<course_ID>/manage Enter the URL <YOUR_SITE_URL>/course/tags.php?id=<course_ID> Confirm that you are redirected to <YOUR_SITE_URL>/course/<course_ID>/tags Log out and log in as a student and enter the URL <YOUR_SITE_URL>/course/tags.php?id=<course_ID> Confirm that you get an error saying you don't have permission to change course tags.
    • Show
      Fails against automated checks. Checked MDL-82565 using repository: https://github.com/andrewnicols/moodle.git main (9 errors / 2 warnings) [branch: MDL-82565-main | CI Job ] overview (0/0) , phplint (0/0) , phpcs (6/2) , js (0/0) , css (0/0) , phpdoc (2/0) , commit (1/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Should these errors be fixed? Built on: Thu Mar 13 01:00:05 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-82565 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18562/ PHPUnit (sqlsrv / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63581/ Behat (NonJS - boost and classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63582/ Behat (Firefox - boost / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63583/ Behat (Firefox - classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63584/ App tests (stable app version) / complete) Built on: Wed Mar 12 14:12:54 UTC 2025

      As a followup to the introduction of routing, we want to add support for routing other pages in Moodle.

      For example, to access /course/view.php?id=2 to access a course with id of 2, it would be ideal to have a URL such as /course/view/2 or /course/view/name:shortname.

      These ability to support this kind of notation is introduced by MDL-81031 but no routes currently apply to standard pages.

      As part of this we would also want to look at a b/c shim, for example to redirect to the new location.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Meirza Meirza
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 weeks, 3 days, 6 hours, 44 minutes
                2w 3d 6h 44m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.