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

component things should sit under component dirs (self-contained)

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: General, Tasks
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      While reviewing MDL-65047 it was detected that the subsystem (aka, a component) cron task was being added to the core component instead of the corresponding core_portfolio one. That means, in practice, that all those cron tasks are being added to /lib/classes/task instead of xxxx/classes/task, polluting the core namespace with stuff that, simply, shouldn't be there.

      Everything works, yes... but the very same that it's cristal clear that plugins (and subplugins), both being components, have to be 100% self-contained... exactly the same should be applied to subsystem components as much as possible.

      This doesn't apply only to tasks but to every other (ab)use of the core namespace by any component (subsystem, plugin or subplugin).

      Known exceptions being:

      1) subsystems without a base dir.
      2) events, when it was (maybe wrongly) decided that we were going to add all events to core.

      Other than that, we should aim (IMO) to achieve as much "self-containing" as possible.

      Open for discussion, just creating this to have a start point to proceed.

      Ciao

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Ryan Wyllie, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: