Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65061

Implement suspend on external unenrol option for ims enterprise enrolment method

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Waiting for peer review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      Hide

      Setup and initial enrolments

      1) Login as admin to your site

      2) Open Site admin => Plugins => Enrolments => IMS Enterprise file

      3) Ensure appropriate values have been set for:

      • Basic settings => File location
      • Basic settings => Log file output location
      • User data options => Create user accounts for users not yet registered in Moodle (Set this to true/ticked)
      • Roles => Learner = Student
      • Roles => Instructor = Teacher
      • Roles => Member = Student
      • Course data options => Create new (hidden) courses if not found in Moodle (set to true/ticked)
      • Course data options => Allow the IMS data to unenrol students/teachers (set to true/ticked)

      Save Changes

      4) Create IMS enterprise data file (in the location specified by settings) with contents:

       

       
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <enterprise>  <properties lang="EN">
          <datasource>USX</datasource>
          <datetime>28/Aug/2019</datetime>
        </properties>  <person>
          <sourcedid>
            <source>USX</source>
            <id>UID000001</id>
          </sourcedid>
          <userid>UID000001</userid>
          <name>
            <fn>IMS User01</fn>
            <n>
              <family>User01</family>
              <given>IMS</given>
            </n>
          </name>
          <extension>
            <webcredential/>
          </extension>
        </person>  <person>
          <sourcedid>
            <source>USX</source>
            <id>UID000002</id>
          </sourcedid>
          <userid>UID000002</userid>
          <name>
            <fn>IMS User02</fn>
            <n>
              <family>User02</family>
              <given>IMS</given>
            </n>
          </name>
          <extension>
            <webcredential/>
          </extension>
        </person>  <person>
          <sourcedid>
            <source>USX</source>
            <id>UID000003</id>
          </sourcedid>
          <userid>UID000003</userid>
          <name>
            <fn>IMS User03</fn>
            <n>
              <family>User03</family>
              <given>IMS</given>
            </n>
          </name>
          <extension>
            <webcredential/>
          </extension>
        </person>  <person>
          <sourcedid>
            <source>USX</source>
            <id>UID000004</id>
          </sourcedid>
          <userid>UID000004</userid>
          <name>
            <fn>IMS User04</fn>
            <n>
              <family>User04</family>
              <given>IMS</given>
            </n>
          </name>
          <extension>
            <webcredential/>
          </extension>
        </person>  <person>
          <sourcedid>
            <source>USX</source>
            <id>UID000005</id>
          </sourcedid>
          <userid>UID000005</userid>
          <name>
            <fn>IMS User05</fn>
            <n>
              <family>User05</family>
              <given>IMS</given>
            </n>
          </name>
          <extension>
            <webcredential/>
          </extension>
        </person>
        
        <group>
            <sourcedid>
              <source>USX</source>
              <id>USX_IMS_ENROL_COURSE</id>
            </sourcedid>
            <description>
              <short>IMS Enrol course</short>
            </description>
            <extension>
              <template>Blank</template>
            </extension>
            <org><orgunit>IMS studies</orgunit></org>
        </group>
        
        <membership>
          <sourcedid>
            <source>USX</source>
            <id>USX_IMS_ENROL_COURSE</id>
          </sourcedid>
          <member>
                <sourcedid>
                  <source>USX</source>
                  <id>UID000001</id>
                </sourcedid> 
                <idtype idtype="1"/>
                <role roletype="02">
                  <userid/>
                  <status>1</status>
                </role>
          </member>
          <member>
                <sourcedid>
                  <source>USX</source>
                  <id>UID000002</id>
                </sourcedid> 
                <idtype idtype="1"/>
                <role roletype="01">
                  <userid/>
                  <status>1</status>
                </role>
          </member>
            <member>
                <sourcedid>
                  <source>USX</source>
                  <id>UID000003</id>
                </sourcedid> 
                <idtype idtype="1"/>
                <role roletype="01">
                  <userid/>
                  <status>1</status>
                </role>
          </member>
            <member>
                <sourcedid>
                  <source>USX</source>
                  <id>UID000004</id>
                </sourcedid> 
                <idtype idtype="1"/>
                <role roletype="01">
                  <userid/>
                  <status>1</status>
                </role>
          </member>
            <member>
                <sourcedid>
                  <source>USX</source>
                  <id>UID000005</id>
                </sourcedid> 
                <idtype idtype="1"/>
                <role roletype="01">
                  <userid/>
                  <status>1</status>
                </role>
          </member>
        </membership>
      </enterprise> 

       

      5) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file.

      6) Review roles and enrolments for the newly cerated users to confirm that User01 is an instructor, and User02, User03, User04, User05 are students.

       

      Un-enrol (Delete enrolment & roles)

      1) Open Site admin => Plugins => Enrolments => IMS Enterprise file and set "Unenrol action" to "Delete enrolment & roles"

      2) Create IMS enterprise data file (in the location specified by settings) with contents:

       
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <enterprise>
      <properties lang="EN">
       <datasource>USX</datasource>
       <datetime>28/Aug/2019</datetime>
       </properties>
      <membership>
       
       <sourcedid>
       <source>USX</source>
       <id>USX_IMS_ENROL_COURSE</id>
       </sourcedid>
       
       <member>
       <sourcedid>
       <source>USX</source>
       <id>UID000001</id>
       </sourcedid> 
       <idtype idtype="1"/>
       <role roletype="02">
       <userid/>
       <status>0</status>
       </role>
       </member>
      </membership>
      </enterprise>
       
      

      3) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file.

      4) Review roles and enrolments to confirm that no enrolment and roles appear for user, IMS User01.

       

      Un-enrol (Delete enrolment only)

      1) Open Site admin => Plugins => Enrolments => IMS Enterprise file and set "Unenrol action" to "Delete enrolment only"

      2) Create IMS enterprise data file (in the location specified by settings) with contents:

       

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <enterprise>
      <properties lang="EN">
       <datasource>USX</datasource>
       <datetime>28/Aug/2019</datetime>
       </properties>
      <membership>
       
       <sourcedid>
       <source>USX</source>
       <id>USX_IMS_ENROL_COURSE</id>
       </sourcedid>
       
       <member>
       <sourcedid>
       <source>USX</source>
       <id>UID000002</id>
       </sourcedid> 
       <idtype idtype="1"/>
       <role roletype="01">
       <userid/>
       <status>0</status>
       </role>
       </member>
      </membership>
      </enterprise>
      

       

      3) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file.

      4) Review roles and enrolments to confirm that no enrolment appear for user, IMS User02, but that their role however still exists.

       

      Un-enrol (Suspend enrolment only)

      1) Open Site admin => Plugins => Enrolments => IMS Enterprise file and set "Unenrol action" to "Suspend enrolment only"

      2) Create IMS enterprise data file (in the location specified by settings) with contents:

       

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <enterprise>
      <properties lang="EN">
       <datasource>USX</datasource>
       <datetime>28/Aug/2019</datetime>
       </properties>
      <membership>
       
       <sourcedid>
       <source>USX</source>
       <id>USX_IMS_ENROL_COURSE</id>
       </sourcedid>
       
       <member>
       <sourcedid>
       <source>USX</source>
       <id>UID000003</id>
       </sourcedid> 
       <idtype idtype="1"/>
       <role roletype="01">
       <userid/>
       <status>0</status>
       </role>
       </member>
      </membership>
      </enterprise>
       
      

      3) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file.

      4) Review roles and enrolments to confirm that the enrolment for user, IMS User03, is suspended but that their role however still exists.

       

      Un-enrol (Suspend enrolment & remove roles)

      1) Open Site admin => Plugins => Enrolments => IMS Enterprise file and set "Unenrol action" to "Suspend enrolment only"

      2) Create IMS enterprise data file (in the location specified by settings) with contents:

       

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <enterprise>
      <properties lang="EN">
       <datasource>USX</datasource>
       <datetime>28/Aug/2019</datetime>
       </properties>
      <membership>
       
       <sourcedid>
       <source>USX</source>
       <id>USX_IMS_ENROL_COURSE</id>
       </sourcedid>
       
       <member>
       <sourcedid>
       <source>USX</source>
       <id>UID000004</id>
       </sourcedid> 
       <idtype idtype="1"/>
       <role roletype="01">
       <userid/>
       <status>0</status>
       </role>
       </member>
      </membership>
      </enterprise>
      

       

      3) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file.

      4) Review roles and enrolments to confirm that the enrolment for user, IMS User04, is suspended and that their role has also been removed.

       

      Un-enrol (Delete enrolment & roles) when recstatus and status clash
      1) Open Site admin => Plugins => Enrolments => IMS Enterprise file and set "Unenrol action" to "Delete enrolment & roles"

      2) Create IMS enterprise data file (in the location specified by settings) with contents:

       

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <enterprise>
      <properties lang="EN">
       <datasource>USX</datasource>
       <datetime>28/Aug/2019</datetime>
       </properties>
      <membership>
       
       <sourcedid>
       <source>USX</source>
       <id>USX_IMS_ENROL_COURSE</id>
       </sourcedid>
       
       <member>
       <sourcedid>
       <source>USX</source>
       <id>UID000005</id>
       </sourcedid> 
       <idtype idtype="1"/>
       <role roletype="01" recstatus="3">
       <userid/>
       <status>1</status>
       </role>
       </member>
      </membership>
      </enterprise>
      

       

      3) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file.

      4) Review roles and enrolments to confirm that no enrolment and roles appear for user, IMS User05 (despite the status being set to 1).

       

      Show
      Setup and initial enrolments 1) Login as admin to your site 2) Open Site admin => Plugins => Enrolments => IMS Enterprise file 3) Ensure appropriate values have been set for: Basic settings => File location Basic settings => Log file output location User data options => Create user accounts for users not yet registered in Moodle (Set this to true/ticked) Roles => Learner = Student Roles => Instructor = Teacher Roles => Member = Student Course data options => Create new (hidden) courses if not found in Moodle (set to true/ticked) Course data options => Allow the IMS data to unenrol students/teachers (set to true/ticked) Save Changes 4) Create IMS enterprise data file (in the location specified by settings) with contents:     <?xml version= "1.0" encoding= "ISO-8859-1" ?> <enterprise> <properties lang= "EN" > <datasource>USX</datasource> <datetime> 28 /Aug/ 2019 </datetime> </properties> <person> <sourcedid> <source>USX</source> <id>UID000001</id> </sourcedid> <userid>UID000001</userid> <name> <fn>IMS User01</fn> <n> <family>User01</family> <given>IMS</given> </n> </name> <extension> <webcredential/> </extension> </person> <person> <sourcedid> <source>USX</source> <id>UID000002</id> </sourcedid> <userid>UID000002</userid> <name> <fn>IMS User02</fn> <n> <family>User02</family> <given>IMS</given> </n> </name> <extension> <webcredential/> </extension> </person> <person> <sourcedid> <source>USX</source> <id>UID000003</id> </sourcedid> <userid>UID000003</userid> <name> <fn>IMS User03</fn> <n> <family>User03</family> <given>IMS</given> </n> </name> <extension> <webcredential/> </extension> </person> <person> <sourcedid> <source>USX</source> <id>UID000004</id> </sourcedid> <userid>UID000004</userid> <name> <fn>IMS User04</fn> <n> <family>User04</family> <given>IMS</given> </n> </name> <extension> <webcredential/> </extension> </person> <person> <sourcedid> <source>USX</source> <id>UID000005</id> </sourcedid> <userid>UID000005</userid> <name> <fn>IMS User05</fn> <n> <family>User05</family> <given>IMS</given> </n> </name> <extension> <webcredential/> </extension> </person> <group> <sourcedid> <source>USX</source> <id>USX_IMS_ENROL_COURSE</id> </sourcedid> <description> < short >IMS Enrol course</ short > </description> <extension> <template>Blank</template> </extension> <org><orgunit>IMS studies</orgunit></org> </group> <membership> <sourcedid> <source>USX</source> <id>USX_IMS_ENROL_COURSE</id> </sourcedid> <member> <sourcedid> <source>USX</source> <id>UID000001</id> </sourcedid> <idtype idtype= "1" /> <role roletype= "02" > <userid/> <status> 1 </status> </role> </member> <member> <sourcedid> <source>USX</source> <id>UID000002</id> </sourcedid> <idtype idtype= "1" /> <role roletype= "01" > <userid/> <status> 1 </status> </role> </member> <member> <sourcedid> <source>USX</source> <id>UID000003</id> </sourcedid> <idtype idtype= "1" /> <role roletype= "01" > <userid/> <status> 1 </status> </role> </member> <member> <sourcedid> <source>USX</source> <id>UID000004</id> </sourcedid> <idtype idtype= "1" /> <role roletype= "01" > <userid/> <status> 1 </status> </role> </member> <member> <sourcedid> <source>USX</source> <id>UID000005</id> </sourcedid> <idtype idtype= "1" /> <role roletype= "01" > <userid/> <status> 1 </status> </role> </member> </membership> </enterprise>   5) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file. 6) Review roles and enrolments for the newly cerated users to confirm that User01 is an instructor, and User02, User03, User04, User05 are students.   Un-enrol (Delete enrolment & roles) 1) Open Site admin => Plugins => Enrolments => IMS Enterprise file and set "Unenrol action" to "Delete enrolment & roles" 2) Create IMS enterprise data file (in the location specified by settings) with contents:   <?xml version= "1.0" encoding= "ISO-8859-1" ?> <enterprise> <properties lang= "EN" > <datasource>USX</datasource> <datetime> 28 /Aug/ 2019 </datetime> </properties> <membership> <sourcedid> <source>USX</source> <id>USX_IMS_ENROL_COURSE</id> </sourcedid> <member> <sourcedid> <source>USX</source> <id>UID000001</id> </sourcedid> <idtype idtype= "1" /> <role roletype= "02" > <userid/> <status> 0 </status> </role> </member> </membership> </enterprise>   3) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file. 4) Review roles and enrolments to confirm that no enrolment and roles appear for user, IMS User01.   Un-enrol (Delete enrolment only) 1) Open Site admin => Plugins => Enrolments => IMS Enterprise file and set "Unenrol action" to "Delete enrolment only" 2) Create IMS enterprise data file (in the location specified by settings) with contents:   <?xml version= "1.0" encoding= "ISO-8859-1" ?> <enterprise> <properties lang= "EN" > <datasource>USX</datasource> <datetime> 28 /Aug/ 2019 </datetime> </properties> <membership> <sourcedid> <source>USX</source> <id>USX_IMS_ENROL_COURSE</id> </sourcedid> <member> <sourcedid> <source>USX</source> <id>UID000002</id> </sourcedid> <idtype idtype= "1" /> <role roletype= "01" > <userid/> <status> 0 </status> </role> </member> </membership> </enterprise>   3) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file. 4) Review roles and enrolments to confirm that no enrolment appear for user, IMS User02, but that their role however still exists.   Un-enrol (Suspend enrolment only) 1) Open Site admin => Plugins => Enrolments => IMS Enterprise file and set "Unenrol action" to "Suspend enrolment only" 2) Create IMS enterprise data file (in the location specified by settings) with contents:   <?xml version= "1.0" encoding= "ISO-8859-1" ?> <enterprise> <properties lang= "EN" > <datasource>USX</datasource> <datetime> 28 /Aug/ 2019 </datetime> </properties> <membership> <sourcedid> <source>USX</source> <id>USX_IMS_ENROL_COURSE</id> </sourcedid> <member> <sourcedid> <source>USX</source> <id>UID000003</id> </sourcedid> <idtype idtype= "1" /> <role roletype= "01" > <userid/> <status> 0 </status> </role> </member> </membership> </enterprise>   3) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file. 4) Review roles and enrolments to confirm that the enrolment for user, IMS User03, is suspended but that their role however still exists.   Un-enrol (Suspend enrolment & remove roles) 1) Open Site admin => Plugins => Enrolments => IMS Enterprise file and set "Unenrol action" to "Suspend enrolment only" 2) Create IMS enterprise data file (in the location specified by settings) with contents:   <?xml version= "1.0" encoding= "ISO-8859-1" ?> <enterprise> <properties lang= "EN" > <datasource>USX</datasource> <datetime> 28 /Aug/ 2019 </datetime> </properties> <membership> <sourcedid> <source>USX</source> <id>USX_IMS_ENROL_COURSE</id> </sourcedid> <member> <sourcedid> <source>USX</source> <id>UID000004</id> </sourcedid> <idtype idtype= "1" /> <role roletype= "01" > <userid/> <status> 0 </status> </role> </member> </membership> </enterprise>   3) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file. 4) Review roles and enrolments to confirm that the enrolment for user, IMS User04, is suspended and that their role has also been removed.   Un-enrol (Delete enrolment & roles) when recstatus and status clash 1) Open Site admin => Plugins => Enrolments => IMS Enterprise file and set "Unenrol action" to "Delete enrolment & roles" 2) Create IMS enterprise data file (in the location specified by settings) with contents:   <?xml version= "1.0" encoding= "ISO-8859-1" ?> <enterprise> <properties lang= "EN" > <datasource>USX</datasource> <datetime> 28 /Aug/ 2019 </datetime> </properties> <membership> <sourcedid> <source>USX</source> <id>USX_IMS_ENROL_COURSE</id> </sourcedid> <member> <sourcedid> <source>USX</source> <id>UID000005</id> </sourcedid> <idtype idtype= "1" /> <role roletype= "01" recstatus= "3" > <userid/> <status> 1 </status> </role> </member> </membership> </enterprise>   3) Click the link "perform an IMS Enterprise import right now" at the foot of the IMS settings page to trigger processing of the file. 4) Review roles and enrolments to confirm that no enrolment and roles appear for user, IMS User05 (despite the status being set to 1).  
    • Affected Branches:
      MOODLE_37_STABLE
    • Pull Master Branch:
      MDL-65061-master

      Description

      The option to suspend on external unenrol action is available in the external database enrolment method but not the IMS enterprise enrolment method.

        Attachments

        1. image002.png
          0.7 kB
          Alistair Spark
        2. image004.jpg
          0.4 kB
          Alistair Spark
        3. IMS Enrolment unenrol refinement proposal - v2.0.pdf
          593 kB
          Segun Babalola

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: