Contrib Extensions module and Core Modules.

Contrib Extensions module and Core Modules.

by James McLean -
Number of replies: 1

Hi Folks,

As some of you may be aware, At UniSA we're porting our Extensions module from 1.9 to 2.4+ at the moment. I've been keeping a thread updated on my progress so far (https://moodle.org/mod/forum/discuss.php?d=216784), but as you will expect there will be a number of issues with this working correctly with the core-supplied modules as they currently stand. 

I have completed porting and improving about 60% of our existing code so far, and so far it's using 100% core moodle functionality. I'm still porting existing code and improving as I go (adding more features and configuration options for example) but all of this code, once completed, will be released to the community as a stand alone contrib module. I'm not quite at the point where core-modules (assign, quiz etc) will need to check this module for extensions, however this is at the forefront of my mind as a blocker I will soon run into, probably in the next week or so.

From here, it's inevitable that there will need to be code modifications made to core-modules for this to work for us; we're in a position where we have built so much advanced functionality into our existing Moodle 1.9 system that we cannot move to 2.4+ without bringing that functionality forward. Obviously that's of our own making, however I would like to use this as a chance to grow and extend functionality of some of the existing Core modules to a point where they may be able to hook into any other module and use data from those modules as needed.

What I'm proposing is that, aiming at a future major version (2.6?), a method of core modules requesting information from other modules is implemented in core, and each activity module. This could be done in such a way that the most used activity modules (assignment, assign, quiz, forum, lesson) are implemented one at a time, which reduces the requirement to have every module that supports duedates being ready on day 1. That may not be the best way to implement it, it is just some high-level thoughts I had on how to implement this that works best for the community. 

It may be possible to build this something like the plugin_supports(); system that is present in the core and modules in 2.4, however rather than being oriented core -> modules it would be module -> core -> module.

As we will be requiring it and using it first, I am happy to do the work on this. Myself and another developer here have excellent knowledge of Moodle code as we've been working with it extensively since 2009, and we are now waist deep in M2.4 with our current upgrades.

What I need from here though is suggestions and guidelines from core team members and project contributors on the best way forward for this, so that it will be implemented correctly in a way that can be added to Core without disruption to other code or modules. We'll be doing the work anyway, so we may as well do it right, and contribute it to the community.

Thoughts and suggestions appreciated.

Thanks.

Average of ratings: -