GSoC 2015 – Moorsp Plugin for Moodle – Update 5

Another week of GSoC 2015 passes by and I have managed to make some advances in my project of building the Moorsp plugin for Moodle.

During the past week, I migrated the plugin to the new Events API described here, and in the process added an Observer class to watch for Moodle Plagiarism events.

The Observer in Moorsp is currently configured to handle events related to assessable_uploaded, with more event support to be built in during the coming week.

Dan, my mentor for the project, has suggested that I move the observer to a /classes folder within the plugin to enable autoloading.

During the past week I found the debugging framework in Moodle to be extremely helpful in finding out the values of various params without having to use an external debugger.

The $observers array in Moorsp currently takes the form of;

 


$observers = array (
 /**
 * Event observers
 */
 array(
 'eventname' => '\assignsubmission_file\event\assessable_uploaded',
 'callback' => 'plugin_moorsp_observer::assignsubmission_file_uploaded',
 'includefile' => '/plagiarism/moorsp/observer.php'
 ),
 array(
 'eventname' => '\mod_workshop\event\assessable_uploaded',
 'callback' => 'plugin_moorsp_observer::moorsp_observer_content_uploaded'
 ),
 array(
 'eventname' => '\mod_forum\event\assessable_uploaded',
 'callback' => 'plugin_moorsp_observer::moorsp_observer_content_uploaded'
 ),
 array(
 'eventname' => '\assignsubmission_onlinetext\event\assessable_uploaded',
 'callback' => 'plugin_moorsp_observer::moorsp_observer_content_uploaded'
 )
);

That’s it for this week. See you soon!