We are planning to use Moodle Network on our University... but after making some tests I came up with some, let' say, design problems. I would really appreciate if you could give me some advices.
We wanted to enable users to roam to different moodles from different faculties and we also wanted that they wouldn't have to know in which moodle reside their courses to access them...let's say, some student has a biology course in moodle A, a maths course in moodle B and a geography course in moodle C. That student logs into moodle A and he should see the 3 courses in mycourses block (and be able to access them, of course).
Users, courses and course enrollments are made automatically in moodle A, B and C. (we have information system records integration)...so, no need to create new users records...
I wonder if someone is using MNET with a similar scenario, and if yes do you have any design advice?
I made some experiments (only with 2 moodles) and I noticed that when student enters moodle A for the first time, moodle B courses do not appear in mycourses block, but only after the student enters site B using the link available on Network Servers block. Is it possible to have the course list automatically updated? (simulating the user entrance on siteB?)
Thank you in advance, susana
yes, this is sort of typical MNet deployment scenario. But several aspects has to be taken into account.
- in MNet environment, every student has one server as their "home base". That is the only server that asks the user for user name and password. Such a server is called as identity provider (IdP). Once they are logged to their home server, users can then roam to other MNet peers.
- at every other server, user record has to be created, too. MNet does this automatically during the first successful roam to that server.
- since the remote user account is created at a host, Moodle works with that account as if it was ordinary user. So enrolments, role assignments etc all work.
If you want to display the information about the enrolled courses at the remote MNet peer before the user ever roamed to it, you will have to push their accounts into remote servers manually, setting their mnethostid field to the correct value.
Thank you for your input!
I have one more question:
Actually, I did create the user into the remote server B, setting their mnethostid field to the server number. I did it updating the user entry in the mdl_user table (I have also updated auth=mnet). But it seems this is not enough in order to all courses get displayed on "home base" server A.... maybe because mdl_mnet_(...) tables must also be updated, right?... and it only happens when the user logs in into server B...
So, if I want to have all user courses displayed on server A (home base) at the first login, do I have to manually update mdl_mnet_enrol_assignments and mdl_mnet_enrol_course?
Hope my question is clear...
Thank you again for your feedback
Instead of populating the tables manually, I would suggest to call the XML-RPC to update the remote enrolments cache when needed. See for the code in /admin/mnet/enr_course_enrol.php
In Moodle 2.0, this part was rewritten a bit, you may find the new code in /mnet/service/enrol/.
Ok. Thanks for the information.