Moodle

Local directory: Evaluate if we should process subdirectories of local

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.4
  • Fix Version/s: 2.0
  • Component/s: Other
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

From HQ chat:

I'm looking at http://tracker.moodle.org/browse/CONTRIB-970 which is a block that is really not a block or intended to function as a block. Instead the developer is just using it to have a convenient place to create a cron job; however, the self_test is failing because there are no available formats. I'm thinking he would be better off using /local/cron.php but wanted to get a second opinion before I wrote my comment.

If so, I would go ahead and create cvs.moodle.org/contrib/plugins/local/ since this would be the first one; however, I am wondering how we would then handle naming them. Would it make sense to add a directory so that there could be various pieces of local code just like we have various blocks and activities? Then we could have something like /local/catgrades/cron.php, /local/ponies/cron.php, etc. It would just mean stepping through each of the directories in local (if they exist - if not, assume that things are as they are now). This would make figuring out what do with them in contrib really helpful/easier.

Alternatively, we can postpone making a decision on this one by keeping it as a block and just having that 'block' with its own self_test function. But I kind of like the idea of processing the subdirectories of local. Thanks for any suggestions.

Peace - Anthony

Issue Links

Activity

Hide
Anthony Borrow added a comment -

Having some clarity on how we want to handle local (especially various instances of /db/install.xml and cron.php) would be helpful. I think it is most consistent with other areas of Moodle to have various possible subdirectories under local like we do for blocks, mod, etc. Peace - Anthony

Show
Anthony Borrow added a comment - Having some clarity on how we want to handle local (especially various instances of /db/install.xml and cron.php) would be helpful. I think it is most consistent with other areas of Moodle to have various possible subdirectories under local like we do for blocks, mod, etc. Peace - Anthony
Hide
Anthony Borrow added a comment -

Tim commented that blocks get "abused" like this all the time. It may be best not to use local for CONTRIB-970 and avoid the whole issue for now but at some point I suspect folks will start to make use of local.

Show
Anthony Borrow added a comment - Tim commented that blocks get "abused" like this all the time. It may be best not to use local for CONTRIB-970 and avoid the whole issue for now but at some point I suspect folks will start to make use of local.
Hide
Petr Škoda (skodak) added a comment -

this should be finally solved by the new local plugin support and general plugin improvements, thanks for the report

Show
Petr Škoda (skodak) added a comment - this should be finally solved by the new local plugin support and general plugin improvements, thanks for the report

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: