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

Migrate local library functions to namespaced class methods

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Deferred
    • Affects Version/s: 3.11
    • Fix Version/s: None
    • Component/s: Other
    • Labels:

      Description

      Description

      A number of local PHP library function files are included in the plugin. These should be moved to appropriate class files in appropriately namespaced class files. Examples of these files include:

      • locallib.php
      • viewlib.php
      • brokerlib.php

      This also includes functions included in endpoint files, for example:

      • bbb_view.php

      Severity

      Medium. All functions should be in an appropriately namespaced, auto-loaded class. This ensures that there are no dependencies on manual file inclusion, which can lead to errors and warnings depending on the code path taken.

      Proposed solution

      Move and update the affected local functions to be functions in appropriated namespaced classes.

      Difficulty

      Medium. This is not a difficult exercise but will likely be time-consuming. There may be some additional benefits to this work in that other code no-longer required for current Moodle versions can be removed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              dobedobedoh Andrew Nicols
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 minutes
                  5m