Difference between revisions of "IMS Enterprise"

Jump to: navigation, search
(location)
(text copied from help file)
Line 1: Line 1:
{{Moodle 1.6}}Location: IMS Enterprise file edit settings link in ''Administration > Courses > [[Enrolment plugins|Enrolments]]''
+
Location: IMS Enterprise file edit settings link in ''Administration > Courses > [[Enrolment plugins|Enrolments]]''
  
  
 
'''IMS Enterprise''' is an international standard XML file format which may be used to specify enrolments/unenrolments in courses, as well as course information and user information.
 
'''IMS Enterprise''' is an international standard XML file format which may be used to specify enrolments/unenrolments in courses, as well as course information and user information.
  
Starting in Moodle 1.6, IMS Enterprise files may be used for enrolment. For more information please see [http://cvs.moodle.org/moodle/lang/en_utf8/help/enrol/imsenterprise/formatoverview.html?view=co the main IMS Enterprise help file].
+
==Format overview==
 +
 
 +
Below is a simple guide to the basic structure of a typical IMS Enterprise data file. Much more information is available on the [http://www.imsglobal.org/enterprise/ IMS Enterprise official website].
 +
 
 +
You may like to read the [http://cvs.moodle.org/contrib/plugins/enrol/imsenterprise/entv1p1_conformance_summary.html?view=co conformance summary] which describes which IMS data elements this plugin can process.
 +
 
 +
==Basic guide to IMS Enterprise file format==
 +
 
 +
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.
 +
 
 +
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.
 +
 
 +
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
 +
 
 +
  <group>
 +
    <sourcedid>
 +
      <source>MyDataSystem</source>
 +
      <id>MOODLE101</id>
 +
    </sourcedid>
 +
    <description>
 +
      <short>Moodle 101</short>
 +
    </description>
 +
  </group>
 +
 
 +
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":
 +
 
 +
<person>
 +
    <sourcedid>
 +
      <source>MyDataSystem</source>
 +
      <id>jmoodle</id>
 +
    </sourcedid>
 +
    <userid>jmoodle</userid>
 +
    <name>
 +
      <fn>Joe Moodle</fn>
 +
      <n>
 +
        <family>MOODLE</family>
 +
        <given>JOE</given>
 +
      </n>
 +
    </name>
 +
  </person>
 +
 
 +
If Joe doesn't already have an account, the script can (optionally) create an account for him.
 +
 
 +
Let's now look at the membership, adding the person to the course:
 +
 
 +
  <membership>
 +
    <sourcedid>
 +
      <source>MyDataSystem</source>
 +
      <id>MOODLE101</id>
 +
    </sourcedid>
 +
    <member>
 +
      <sourcedid>
 +
        <source>MyDataSystem</source>
 +
        <id>jmoodle</id>
 +
      </sourcedid>
 +
      <role roletype="01">
 +
        <status>1</status>
 +
        <extension><cohort>unit 2</cohort></extension>
 +
      </role>
 +
    </member>
 +
  </membership>
 +
 
 +
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.
 +
 
 +
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.
  
 
==See also==
 
==See also==

Revision as of 14:27, 20 May 2010

Location: IMS Enterprise file edit settings link in Administration > Courses > Enrolments


IMS Enterprise is an international standard XML file format which may be used to specify enrolments/unenrolments in courses, as well as course information and user information.

Format overview

Below is a simple guide to the basic structure of a typical IMS Enterprise data file. Much more information is available on the IMS Enterprise official website.

You may like to read the conformance summary which describes which IMS data elements this plugin can process.

Basic guide to IMS Enterprise file format

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.

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.

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

 <group>
   <sourcedid>
     <source>MyDataSystem</source>
     <id>MOODLE101</id>
   </sourcedid>
   <description>
     <short>Moodle 101</short>
   </description>
 </group>

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":

<person>
   <sourcedid>
     <source>MyDataSystem</source>
     <id>jmoodle</id>
   </sourcedid>
   <userid>jmoodle</userid>
   <name>
     <fn>Joe Moodle</fn>
     <n>
       <family>MOODLE</family>
       <given>JOE</given>
     </n>
   </name>
 </person>

If Joe doesn't already have an account, the script can (optionally) create an account for him.

Let's now look at the membership, adding the person to the course:

 <membership>
   <sourcedid>
     <source>MyDataSystem</source>
     <id>MOODLE101</id>
   </sourcedid>
   <member>
     <sourcedid>
       <source>MyDataSystem</source>
       <id>jmoodle</id>
     </sourcedid>
     <role roletype="01">
       <status>1</status>
       <extension><cohort>unit 2</cohort></extension>
     </role>
   </member>
 </membership>

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.

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.

See also