2 IMS Enterprise 1.1 file enrolment module for Moodle
3 (also reported to work with v1.01 and v1.0 data)
5 (c) 2005-2006 Dan Stowell
6 Released under the Gnu Public Licence (GPL)
10 Please see INSTALL.txt.
15 This enrolment script will repeatedly read an XML file from a
16 specified location. The XML file should conform to the IMS Enterprise
17 1.1 specification, containing <person>, <group>, and <membership>
18 elements to specify which students/teachers should be added/removed
19 from the course. User accounts and/or Moodle courses can be created
20 by the script if they aren't yet registered (this is an option which
21 can be turned on/off).
23 (The IMS 1.0 specification is significantly different from the 1.1
24 spec. This code has been made flexible so it should in theory be
25 able to handle IMS 1.0 as well, but I haven't directly tested it
26 with v1.0 Enterprise data.
27 The one restriction that may be important is that the plugin assumes
28 that the <membership> elements come after the others. The 1.1 spec
29 demands this, but the 1.0 spec does not make this restriction.)
32 HOW USERS/COURSES ARE MATCHED AGAINST MOODLE'S DATABASE
34 IMS Enterprise data typically contains a "sourcedid" for each person
35 or group (course) record, which represents the canonical identifier
36 used by the source system. This is separate from the "userid" for a
37 person, which is also present in the data and should represent the
38 login userid which a person is intended to use in Moodle. (In some
39 systems these may have the same value.)
41 This script uses the "sourcedid" as the lookup to determine if the
42 user/course exists in the database, in both cases looking at the
43 "idnumber" field. This "idnumber" is not typically displayed in
44 Moodle. When creating a user, the "userid" field must not be blank,
45 because it is stored as the user's Moodle login ID.
50 The script uses an optimised pattern-matching (regex) method for
51 processing the XML, rather than any built-in XML handling. This is for
52 two reasons: firstly, because some systems produce very sloppy
53 (even invalid) XML and we'd like to be able to process it anyway; and
54 secondly, because PHP 4 and PHP 5 handle XML differently, and we'd
55 like to be independent of that changeover.
61 Please visit the community forums at www.moodle.org and search to see
62 if any relevant help has already been posted. If not, ask away!