MNET 2.0
Introduction
This page attempts to summarise the changes in MNET between Moodle 1.9 and Moodle 2.0, both from an administrative perspective, and a code perspective.
There are still things to do before 2.0 is released, so this page is a work in progress.
Backwards Compatibility Breaks
Plugins registering MNET services
It used to be that the plugins that needed to export mnet services used a mnet_publishes() method on the class (static or not). This led to a list of hard coded plugins that supported it, and in some cases auth factory involvement, just to get a list of the RPC functions available.
This has now changed to a file containing an array, in db/mnet.php, similar to lib/db/services.php. This file looks something like this (example from the Mahara portfolio plugin):
$publishes = array(
'pf' => array(
'apiversion' => 1,
'classname' => 'portfolio_plugin_mahara',
'filename' => 'lib.php',
'methods' => array(
'fetch_file'
),
),
);
$subscribes = array(
'pf' => array(
'send_content_intent' => 'portfolio/mahara/lib.php/send_content_intent',
'send_content_ready' => 'portfolio/mahara/lib.php/send_content_ready',
),
);
Note that there is a unsymmetricality between the methods that are published and the methods that are subscribed to. This is new.
See the following bugs about this:
Method signatures
Other code changes
Administrative changes