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

tool_uploadcourse doesn't support multiple enrolment instances of the same type

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      During this test, you will assess that you can use the name of an enrolment method to update an existing one, and that when the name is not passed, the first instance of the type is updated, if it exists

      1. Create a combination of CSV files similar to the one below

        shortname,fullname,category,enrolment_1,enrolment_1_name,enrolment_1_customint1
        CSV0,CSV0,1,cohort,,999
        CSV1,CSV1,1,cohort,"Cohort instance",1
        CSV2,CSV2,1,cohort,"Second cohort instance",2
        CSV3,CSV3,1,manual,"Manual instance",1
        

      2. Go to the tool to upload courses via CSV and upload your CSV, make sure that
        • You cannot duplicate the manual enrolment method if you specify a name for it
        • You can create as many enrolment methods as you like by using a different name
        • You can update existing methods when you specify their name (use customint1 to check if it's updated)
        • When not passing a name, the first enrolment method matching the type is updated (use customint1 to check if it's updated)
        • You can specify a custom name for the manual enrolment method, but first you need to remove the method it from the course
      3. This should apply to both existing and new courses
      Show
      During this test, you will assess that you can use the name of an enrolment method to update an existing one, and that when the name is not passed, the first instance of the type is updated, if it exists Create a combination of CSV files similar to the one below shortname,fullname,category,enrolment_1,enrolment_1_name,enrolment_1_customint1 CSV0,CSV0,1,cohort,,999 CSV1,CSV1,1,cohort,"Cohort instance",1 CSV2,CSV2,1,cohort,"Second cohort instance",2 CSV3,CSV3,1,manual,"Manual instance",1 Go to the tool to upload courses via CSV and upload your CSV, make sure that You cannot duplicate the manual enrolment method if you specify a name for it You can create as many enrolment methods as you like by using a different name You can update existing methods when you specify their name (use customint1 to check if it's updated) When not passing a name, the first enrolment method matching the type is updated (use customint1 to check if it's updated) You can specify a custom name for the manual enrolment method, but first you need to remove the method it from the course This should apply to both existing and new courses
    • Workaround:
      Hide

      Manually add enrol instances

      Show
      Manually add enrol instances
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-43820-master
    • Sprint:
      BACKEND Sprint 18, 3.1 Sprint 7
    • Issue size:
      Large

      Description

      When using the "Upload courses" tool in Moodle with a CSV file that contains multiple enrol instances of the same type, only one instance is added/updated.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                5 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: