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

Namespace core_backup is mapped to the wrong directory.

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 5.0
    • Backup
    • MOODLE_500_STABLE
    • 83618-namespace-refactor
    • Hide
      1. Navigate to Site administration -> Users -> Privacy -> Plugin privacy compliance registry.
      2. Expand 'core'. Expand 'core_backup'.
      3. Confirm the existence of privacy info.
      4. Navigate to Site administration -> Development -> Hooks overview
      5. Confirm the existence of core_backup\hook\before_course_modified_check.
      6. Navigate to Site administration -> Courses -> Manage courses and categories.
      7. Create a course, click 'Save and return'.
      8. Click on copy icon in course entry.
      9. Confirm the that copy form appears.
      10. Follow through and confirm that copy succeeds.
      11. Perform a backup and a restore. Confirm that both succeed.
      Show
      Navigate to Site administration -> Users -> Privacy -> Plugin privacy compliance registry. Expand 'core'. Expand 'core_backup'. Confirm the existence of privacy info. Navigate to Site administration -> Development -> Hooks overview Confirm the existence of core_backup\hook\before_course_modified_check. Navigate to Site administration -> Courses -> Manage courses and categories. Create a course, click 'Save and return'. Click on copy icon in course entry. Confirm the that copy form appears. Follow through and confirm that copy succeeds. Perform a backup and a restore. Confirm that both succeed.
    • Hide

      Code verified against automated checks.

      Checked MDL-83618 using repository: https://github.com/jaypha/moodle

      More information about this report

      Built on: Thu 28 Nov 2024 01:36:29 AM UTC

      Show
      Code verified against automated checks. Checked MDL-83618 using repository: https://github.com/jaypha/moodle main (0 errors / 0 warnings) [branch: 83618-namespace-refactor | CI Job ] More information about this report Built on: Thu 28 Nov 2024 01:36:29 AM UTC

      In component.json, the entry for backup is mapped to backup/util/ui. This requires all autoloaded classes inside core_backup to be inside the backup/util/ui directory.

      The classes there currently are all part of util/ui. However any classes that would relate to other parts of the backup would need to be placed inside this directory as well. This does not make sense.

      Fore example, if I wish to create a hook for use with helper/copy_helper.php code, it would need to be placed inside backup/util/ui/classes/hook.

      Proposed solution:

      • Remap the core_backup namespace to backup instead of backup/util/ui.
      • Move the classes directory from backup/util/ui to backup.
      • Move renderer.php to backup.

            jasondendulk Jason den Dulk
            jasondendulk Jason den Dulk
            Marcus Boon Marcus Boon
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

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