Help! Problems with IMS enrollment

Help! Problems with IMS enrollment

by Emilio Leiva -
Number of replies: 2

I have imported a new course to moodle by IMS import, and I have no problems. But now, I'm trying to enroll a student on this course and I allways obtain the same result:

Found file c:\xampp\htdocs\moodle\importIMS\importAlu.xml
Created user record for user 'ejls' (ID number emilio).
Added 0 student(s) and 0 teacher(s) to course CursoEJLS
Process has completed. Time taken: 0 seconds.

It import and create the student but no enroll the student on the course.

This is de archive that I'm using for de import:

<?xml version="1.0" encoding="utf-8"?>
<enterprise>
  
 <person>
    <sourcedid>
      <source>Moodle</source>
      <id>emilio</id>
    </sourcedid>
    <userid>ejls</userid>
    <name>
      <fn>Emilio Leiva</fn>
      <n>
        <family>Leiva</family>
        <given>Emilio</given>
      </n>
    </name>
    <email>e-mail</email>
      <extension>
          <WEBCREDENTIAL xmlns="emiliohttp://www.webct.com/IMS">emilio</WEBCREDENTIAL>  
      </extension>
  </person>

<membership>
    <sourcedid>
      <source>Moodle</source>
      <id>CursoEJLS</id>
    </sourcedid>
    <member>
      <sourcedid>
        <source>Moodle</source>
        <id>ejls</id>
      </sourcedid>
      <role roletype="01">
        <status>1</status>
      <!--  <extension><cohort>unit 2</cohort></extension> -->
      </role>
    </member>
  </membership>


</enterprise>

Anybody can help me?

Thanks


Average of ratings: -
In reply to Emilio Leiva

Re: Help! Problems with IMS enrollment

by Eric Merrill -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
The memebership is wrong. The sourcedid.id needs be same for that membership record as the person record.

So the sourcedid.id for the person is emilio, so it needs to be that for membership, not the userid.
In reply to Eric Merrill

Re: Help! Problems with IMS enrollment

by Emilio Leiva -

Hi Eric!  

It was the error!

Thank you very much!!!