1 <h1>Format overview
</h1>
2 <p>Below is a simple guide to the basic structure of a typical IMS Enterprise
3 data file. Much more information is available on the
<a href=
"http://www.imsglobal.org/enterprise/">IMS Enterprise official website
</a>.
</p>
5 <p>You may like to read the
<a href=
"./enrol/imsenterprise/entv1p1_conformance_summary.html">conformance summary
</a> which describes which IMS data elements this plugin can process.
</p>
8 <h1>Basic guide to IMS Enterprise file format
</h1>
10 <p>For any IMS-style enrolment you need a
<group
> tag which specifies the course, a
<person
> tag which specifies the user account, and a
<membership
> tag containing
<member
> tags which specify a person's role within a given course.
</p><p>
14 Remember that the numeric keys used in the Moodle databases are not the interoperable data - a student data system is never going to know in advance that Joe is the
20th user added to the Moodle database - so those aren't the keys exchanged in this type of data.
</p><p>
18 Typically a course would have a reference code as well as a name, so let's assume its code is MOODLE101. To define your course you could use
</p><p>
22 <group
><br />
23 <sourcedid
><br />
24 <source
>MyDataSystem
</source
><br />
25 <id
>MOODLE101
</id
><br />
26 </sourcedid
><br />
27 <description
><br />
28 <short
>Moodle
101</short
><br />
29 </description
><br />
30 </group
><br />
34 The enrolment script will look for a course with code MOODLE101, and (optionally) create it if it doesn't exist. Similarly for the person - let's assume it's
"jmoodle
":
</p><p>
38 <person
><br />
39 <sourcedid
><br />
40 <source
>MyDataSystem
</source
><br />
41 <id
>jmoodle
</id
><br />
42 </sourcedid
><br />
43 <userid
>jmoodle
</userid
><br />
44 <name
><br />
45 <fn
>Joe Moodle
</fn
><br />
46 <n
><br />
47 <family
>MOODLE
</family
><br />
48 <given
>JOE
</given
><br />
49 </n
><br />
50 </name
><br />
51 </person
><br />
55 If Joe doesn't already have an account, the script can (optionally) create an account for him.
</p>
59 Let's now look at the membership, adding the person to the course:
</p><p>
63 <membership
><br />
64 <sourcedid
><br />
65 <source
>MyDataSystem
</source
><br />
66 <id
>MOODLE101
</id
><br />
67 </sourcedid
><br />
68 <member
><br />
69 <sourcedid
><br />
70 <source
>MyDataSystem
</source
><br />
71 <id
>jmoodle
</id
><br />
72 </sourcedid
><br />
73 <role roletype=
"01"><br />
74 <status
>1</status
><br />
75 <extension
><cohort
>unit
2</cohort
></extension
><br />
76 </role
><br />
77 </member
><br />
78 </membership
><br />
82 The IMS Enterprise specification does offer a facility for specifying start/end dates for enrolments, so those can be included using the
<timeframe
> tag if needed.
</p><p>
86 If a person is already added to a group within the course, the script won't actually modify that. If they are not grouped, however, then the specified grouping will be applied.
</p><p>