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

Enhancement Suggestion: Replace \core\output\url_rewriter Interface with Native Permalink Functionality for Clean URLs

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.3
    • General
    • MOODLE_403_STABLE

      Title: Enhancement Suggestion: Replace \core\output\url_rewriter Interface with Native Permalink Functionality for Clean URLs

      Description:

      I am proposing an enhancement in Moodle's URL handling mechanism to achieve cleaner, more readable URLs akin to modern CMS and LMS. Currently, the "\core\output\url_rewriter" interface is utilized for rewriting URLs, and it's suggested in some configurations to set a "urlrewriteclass" variable in the config.php. However, this approach can be further refined.

      Initially, removing the "urlrewriteclass" variable from config.php can prevent potential issues, especially with unmaintained plugins like [moodle-local_cleanurls|https://github.com/brendanheywood/moodle-local_cleanurls]. But a more long-term and robust solution would be to create a native URL rewriting mechanism in Moodle core, replacing the \core\output\url_rewriter interface.

      Implementing a native URL rewriting mechanism would align Moodle with modern CMS and LMS platforms in generating clean, semantic, and SEO-friendly URLs. Below are some real-world examples illustrating the transformation from current URL structures to more user-friendly and clean URLs:

      1. Course Page:

      • Current: `course/view.php?id=2`
      • Proposed: `/course/MATH101`

      2. Module Page:

      • Current: `mod/assign/view.php?id=6`
      • Proposed: `/course/MATH101/lesson/6-how-to-do-matrix-multiplication`

      3. User Profile:

      • Current: `/user/view.php?id=60`
      • Proposed: `/user/jhonsmit`

      This transition to a native URL rewriting mechanism will not only enhance the readability and manageability of URLs but also contribute positively to the user experience and SEO performance of the Moodle platform.

      I strongly believe that this enhancement will be a significant step forward in making Moodle more modern, user-friendly, and in line with current web standards. Thank you for considering this suggestion.

            Unassigned Unassigned
            erseco ernesto
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

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