MNet
From MoodleDocs
Moodle1.8
Random notes for Moodle networking (MNet). Should get these organised...
- Documentation for administrators is here MNet
- Some old documentation about the initial planning and dev
Key config variables and functions
// what mnethostid should "local" users have? // this is guaranteed to be set, except during the 1.7->1.8 upgrade $id = $CFG->mnet_localhost_id; // a quick way to check if our user is remote: is_mnet_remote_user($user); // internally is_mnet_remote_user() does // if ($user->mnethostid != $CFG->mnet_localhost_id)
// Are we listening to mnet requests? Nothing else works if we aren't. if ($CFG->mnet_dispatcher_mode === 'strict') { // Moodle is listening to mnet requests. Nothing else works if we aren't. }
// Are we allowing remote users in via auth/mnet? if (is_enabled_auth('mnet')) { // yes indeed }
// Will auth/mnet autocreate new user accts? if (get_config('auth/mnet', 'auto_add_remote_users')) { // yes it will! }
I have never seen a config variable name like 'auth/mnet'. Everywhere else we use 'auth_mnet' style names. And increasingly we are trying to move stuff that can be moved to config_plugins instead of the main $CFG.
Protocols
MNET handshake
Authentication/SSO
Enrolment
To Do
Some immediate items that would add polish without major surgery
- Exchange more enrolment info at log-entry exchange time on cron
- Special default role
- Add a new "remote student" role
- Add a config var to enrol/mnet: "defaultremoterole" to use "remote student"
- Add a config var to the courses table to optionally override defaultremoterole
- Nicer CSS in the "my courses" listing in moodle homepage for remote hosts and remote courses. See course/lib.php print_remote_course() and print_remote_host().
Roadmap
A bit more work, and a whole lot more features. From easy to hard...
- Better per-host stats and log views for administrators. This is relatively easy using data we already have.
- In mod/forum craft a special URL for remote users so that the post URL is in the wantsurl parameter, so they can bounce-off their IDP in one go.
- According to Jonathan Harker, this requires that we modify jump to accept the remote wwwroot as a parameter. Also: will this be safe enough?
- Display aggregated calendar on the IDP
- Exchange grades. Needs a bit of design.
- Build a SCORM/IMSCP/MoodleZip repository scheme.
maybe: the suggested MoodleCORE scheme ?
- MartinL has some ideas on how to get this done in easy and super-scalable.