New or updated resource events

New or updated resource events

by Simon Gaeremynck -
Number of replies: 2

Hello,

I'm looking at integrating an external service with Moodle. In a nutshell, it will check all files being uploaded into Moodle for common Accessibility mistakes, report them back to the instructor and make attempts at automagically rectifying them.

Now, I'm making my first steps into Moodle plugin development and would like to know whether there are any events for new resources being added (or updated). I checked the Event List in the latest Moodle release and it looks like only 2 view events (\mod_resource\event\course_module_viewed and course_module_instance_list_viewed) have been implemented for the resources module? Some old threads on the forum suggest using the mod_created event but I see that's been deprecated/removed when the Events API was refactored. Is there an alternative way to get notified of these events?

The event handler itself won't do anything too complicated, it'll simply send an HTTP request to our REST API notifying there's a new file. That file will then be scheduled to download and process (so all the heavy operations are asynchronous).

Kind regards,
Simon

Average of ratings: -
In reply to Simon Gaeremynck

Re: New or updated resource events

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Could this Moodle Doc, External Tool, relate to what you want to do?

In reply to Colin Fraser

Re: New or updated resource events

by Simon Gaeremynck -

Hi Colin,

Although there will be an LTI component to the tool, that's not what I'm currently after. I'm looking for technical guidance on how to catch "new resource" events in my own (custom) Moodle plugin. I only just noticed there's a "Moodle development' board, should I try there again?

Thanks,
Simon