Posts made by Simon Coggins

I was seeing a similar issue with a fresh install of master when I was trying to create a new development site. It appears to be related to caching and is being discussed here:

https://tracker.moodle.org/browse/MDL-37683

Deleting the cache directory from your moodledata folder should fix it.

Simon

Average of ratings: Useful (1)

I agree with the principle, but I'm not sure how to achieve it in this particular case.

The issue is that open badges need to be awardable across courses, or for things unrelated to any course, so an activity module doesn't seem appropriate since you don't have open badge "instances" which belong to a course. We do intend to create a block for some of the functionality but again it doesn't seem appropriate for everything.

The approach we're taking (which seems to be the way core features like completion, blog or grade do it) is to try to keep the code as separate as possible (within it's own directory and library file), but still use lib/db/ for code upgrades etc.

Personally I wish that core features were more isolated from each other - if there was a "core" plugin type with each feature having it's own "core/[componentname]/db/ directory" rather than having it all together in lib/db/ it would result in less conflicts when merging in changes.

Given that's not how it's done at the moment are there any other plugin types which are appropriate for a feature that's acting at the site level?

Simon

Yes good point Rex and Dan regarding the logging API.

The only question then is why this comment appears in lib/db/events.php:

/* no more here please, core should not consume any events!!!!!!! */

Maybe I should ask Petr as he added that comment.

Simon

Hi Hubert,

I discussed it with Martin at the Perth hackfest and he agreed that we should write it with the intention of it going into core, instead of as a local plugin.

If that's not the case it would be good to know sooner rather than later as Yuliya has started development already.

Assuming it is accepted as core, is it preferred to embed a hook into the right place (as seems to be recommended in the comments), or to use event triggers (as done by course completion for example)?

Simon