MNet
From MoodleDocs
Moodle1.8
Random notes for Moodle Network. Should get these organised...
- Documentation for end users is here Moodle Network
- Some old documentation about the initial planning and dev
Key config variables and functions
// that 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 local
is_mnet_remote_user($user);
// internally wis_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?
// this is a bit more involved -- we should have a function
// CFG->auth_plugins_enabled is guaranteed to be set, except during the 1.7->1.8 upgrade
$auths = explode(',', $CFG->auth_plugins_enabled);
if (in_array('mnet', $auths)) {
// yes, auth/mnet is active
}
// Will auth/mnet autocreate new user accts?
if (get_config('auth/mnet', 'auto_add_remote_users')) {
// yes it will!
}
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.
- MartinL has some ideas on how to get this done in easy and super-scalable.