IMS Enterprise enrolment now in contrib CVS

IMS Enterprise enrolment now in contrib CVS

by Dan Stowell -
Number of replies: 7
The IMS Enterprise enrolment scripts that have been discussed around these parts before, are now available in CVS:
cvs.sourceforge.net/viewcvs.py/moodle/contrib/enrol_imsenterprise/

Or download the overnight bundle:
download.moodle.org/modules/enrol_imsenterprise.zip

I believe that Sussex uni are about to do some interesting work based on this code...

IMPORTANT NOTE:
There are two slightly different scripts bundled in the same package. One which works on Moodle 1.5 and on most people's versions of 1.6 (this is labelled "imsenterprise_premulti"), and one which works on the forthcoming multi-enrolment architecture (labelled "imsenterprise"), the MULTIENROL branch.
Average of ratings: -
In reply to Dan Stowell

Re: IMS Enterprise enrolment now in contrib CVS

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Hi Dan,
We are very much interested in using your code but we are left with a few unanswered questions:
  • I understood that it is possible to add and delete users with IMS enrolment. That makes it possible to use this method as only interface between Moodle and our student database through an XML file for user management and management of predefined enrolments. Right? wink
  • In the IMS specifications, I read that a password can be given for a user (specifications version 1.1), but it is not listed in the 'person' data object list on the IMS Enterprise official website and in the conformance summary for Moodle. So how are passwords created for new users?
  • Is there a way to save the current status of users and courses from a Moodle installation in an IMS file?

In reply to koen roggemans

Re: IMS Enterprise enrolment now in contrib CVS

by Dan Stowell -
* Yes. The documentation (and the IMS Enterprise specification) has more info about this.
* Passwords can be passed in IMS Enterprise data (see the "password" attribute on the "userid" element), but my plugin IGNORES them - passwords are NOT created for new users, so these users can't (by default) authenticate against Moodle's "internal" method. We recommend using Moodle's authentication plugins to authenticate against an external system.
* No. It should not be difficult at all, but it is out of the scope of our requirements, and no-one else has created this.
In reply to Dan Stowell

Re: IMS Enterprise enrolment now in contrib CVS

by Martín Langhoff -

Passwords can be passed in IMS Enterprise data (see the "password" attribute on the "userid" element), but my plugin IGNORES them - passwords are NOT created for new users, so these users can't (by default) authenticate against Moodle's "internal" method.

The latest CSV "users upload" has an option to create new passwords and mail them out (effectively spamming your users). But the trick it uses can be also used by enrol/IMSE when no passwords are in the file, and I'm not really against password creation.

We recommend using Moodle's authentication plugins to authenticate against an external system.

We recommend aiming the gun away from foot and keeping the safety catches well in place. All warranties, express or implied ... wink

However.

IMS Enterprise has, in a single file, auth and enrol data. It may be interesting for an admin who is dealing today with a standalone LMS that can export to IMSE, to be able to migrate to a new standalone and easy-to-setup LMS.

Now... if the new LMS gets all picky and starts asking for fancy LDAP servers to check for a simple password, it gets put in the too hard basket. In that sense Moodle tries to be easy and stress-free.

Ease of migration and world domination... rhyme wink

In reply to Martín Langhoff

Re: IMS Enterprise enrolment now in contrib CVS

by Dan Stowell -
Good points Martín. Since our uni won't be doing this and since I haven't played around with Moodle's password system much, I'm not strongly motivated to dive in to this idea, but maybe it's not too tricky.

So if the IMS data contained something like:

<userid password="cd542uiwe1353" pwencryptiontype="MD5">johnny5</userid>

...could this hash be stored directly in the database and used successfully? Or does Moodle use salt in the password hashing?

I really don't like the idea of having everyone's password stored in the clear, so if the hashes can't be transferred then I'm not keen. (If the hashes are in any format other than MD5 then Moodle couldn't use them at all.)
In reply to Dan Stowell

Re: IMS Enterprise enrolment now in contrib CVS

by Martín Langhoff -

maybe it's not too tricky

Definitely not tricky wink You've done the hard bit already.

...could this hash be stored directly in the database and used successfully? Or does Moodle use salt in the password hashing?

Yes to both. Moodle will deal with MD5 hashes, and IIRC Skodak is working on converting them to salted hashes on successful login.

I really don't like the idea of having everyone's password stored in the clear, so if the hashes can't be transferred then I'm not keen."

Me neither. However, if your IMSE file already has them in cleartext, the problem ain't in Moodle. In any case, you could MD5+salt them on import.

(If the hashes are in any format other than MD5 then Moodle couldn't use them at all.)

We can always teach Moodle to deal with other password formats (and convert them into salted MD5 upon login). But you are right -- it's more work.

In reply to Martín Langhoff

Re: IMS Enterprise enrolment now in contrib CVS

by Noemi Valle -
Hey guys:

I tried to setup the password for a new user using the IMS Enterprise but it did not work. It creates the new user account but the user cannot login into Moodle using the specified password. Here is the xml file I uploaded:

<?xml version="1.0" encoding="UTF-8"?>
<enterprise>
<properties>
<datasource>Moodle</datasource>
<type>Import Snapshot</type>
<datetime>2009-3-2</datetime>
</properties>
<person>
<sourcedid>
<source>Moodle</source>
<id>3333333</id>
</sourcedid>
<userid password="01011980">3333333</userid>
<name>
<fn>TESTING USER</fn>
<n>
<family>USER</family>
<given>TESTING</given>
</n>
</name>
<email>testing3@fiu.edu</email>
</person>
</enterprise>

We want to use Moodle internal authentication system, but we need to setup an initial password for new students equals to the student's date of birth. Can anybody help me with this? The Moodle version I am using is 1.9.4

Thanks in advance