Mensagens colocadas por Itamar Tzadok

Useful feature indeed but not necessarily useful implementation approach.

Any feature that is added to a core component which is maintained by HQ requires allocation of HQ resources on an ongoing basis. As Jean-Michel has pointed out, HQ have limited resources. These limited resources should be better invested in features of general nature and further plugin support.

Lesson overrides is a particular instance and arguably pluggable. In my opinion it is better to develop it as a contributed plugin, until HQ or one of the for/non profit partners allocates resources for a generalized solution. A general solution should probably be an API and hooks for a module overrides plugin similar to solutions in many other areas of Moodle (e.g. logging, course formats, etc.).

Should HQ opt to add the overrides feature to the core Lesson sooner than later, I think that some work should and could be done to wrap it as a core module pluggable component with hooks in relevant areas such as backup/restore.

sorriso

The feature is listed in the tracker since Moodle 1.7, has priority Critical, and 68 votes. It is clearly regarded useful by many and I'm sure by HQ as well. Why it's not in the roadmap I don't know. But resources have been well spent on improving important other APIs such as plugin support, events, backup/restore and logging. Creating a new plugin that can listen and respond to Moodle events and extend or change behavior in different areas is now easier than ever. Give it a try. It may require only a couple of more hours to put this functionality in a plugin and hook it to the core module by a minimal patch. sorriso

By hack I'm referring here to the implementation of an unsystematic local solution for a particular instance of a general problem type. I consider the Quiz solution to be a hack in the same sense. Definitely not pejorative as hacks are inevitable in what we do here even if for the most part undesirable.

To the extent that open issues in the tracker constitue a wish list and then a priority list, this requirement is in the priority list, albeit in that area of the priority list called Dev backlog which is irrelevant for any practical purpose. The requirement can easily be made relevant by changing Dev backlog to some future release.

I do not forget for a moment that HQ development resources are limited and this is precisely the reason why I object to such a hack.

I've only skimmed through your code but it seems that it can be wrapped as a local plugin. Then you would only need a minimal hook in the lesson object constructor to apply the overrides to the user or group. Such a hook would be easy to apply as a patch. The rest would be installable as a plugin.

sorriso


But

  • HQ has developed/integrated/improved quite a few common module features since 2008, e.g grading, completion, restricted access. User/group overrides should now get some serious consideration and should be added to the roadmap as a required common module feature. While we can patch individual Moodle sites with your enhancement, I'm inclined to think that we should not hack core as this may only push a common API down the priority list.
  • There are far more add-on modules than core modules. So while it may seem that the quiz and lesson are special cases, they are really not that special in the larger context of activity plugins. 

sorriso