Hello! I'm very new to webhooks & APIs, and have been trying to set up an automation in Zapier where once a student submits their assignment document, it automatically retrieves the document and pulls it from Moodle. I'm getting stuck as doing this requires creating a custom webhook as there is no built-in unction to retrieve submission documents. Would anyone be able to walk me through how this could be done? Thank you so much!
Hi,
I hope it will help you or someone else if it's too late !
Dominique.
I hope it will help you or someone else if it's too late !
// In the file db/events.php of your local plugin
$observers = array(
array(
'eventname' => '\assignsubmission_file\event\assessable_uploaded',
'callback' => 'pluginname_observer::assessable_uploaded',
),
);
// In the file pluginname_observer.php
class pluginname_observer {
public static function assessable_uploaded(\assignsubmission_file\event\assessable_uploaded $event) {
// Code here.
//....
}
}
Have a nice day.Dominique.