Hi Adam,
The SQL statement you posted won't work, the last digit '0' needs to be the id of the organisation in LAMS you intend to use for Moodle - there is no organisation with id=0. It's also missing a 'userinfo_url', which is what LAMS needs to respond to Moodle.
It should look something like this:
insert into ext_server_org_map (serverid, serverkey, servername, serverdesc, prefix, userinfo_url, timeout_url, disabled, orgid)
values ('neelix', 'neelix', 'neelix.cbhslewisham.nsw.edu.au', 'some description', 'choose a prefix, e.g. cb_', 'http://neelix.cbhslewisham.nsw.edu.au/moodle/mod/lams/userinfo.php?un=%username%&ts=%timestamp%&hs=%hash%', 'some timeout_url', 0, orgid);
The only items you need to get are the orgid and possibly the userinfo_url (your exact URL may be different, I just guessed it). And a prefix for your Moodle usernames. There's no need to manually enter an id for the row in ext_server_org_map, mysql will do that itself (it's also safer to let mysql do it, just in case you have another integrated server entry, and you overwrite it).
To get the orgid of the organisation you want to use:
1. login to LAMS and create an organisation, give it a name
2. login to mysql, and do 'select * from u_organisation'
3. find the row with the organisation name you just created - the column 'sid' is the id of the organisation you want to use.
Posted by Jun-Dir Liew