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

groups table should have 'component' and 'itemid' fields

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test with Course meta link enrol plugin

      1. Enable the "Course meta link" plugin by going to Site administration > Plugins > Enrolments > Manage enrol plugins and clicking the Enable icon for the "Course meta link" row.
      2. Create two courses, A and B
      3. Enrol users in course A
      4. Go to course B, and go to Course administration > Users > Enrolment methods.
      5. Click the dropdown menu under the enrolment methods and select 'Course meta link'.
      6. In the Course meta link page, select course A in the dropdown menu.
      7. For the "Add to group" dropdown menu, select "Create new group".
      8. Click "Add method"
      9. Still in course B, go to "Course administration" > Users > Groups.
        Confirm that you cannot delete the group created by the enrol/meta plugin

      Test with Cohort sync enrol plugin

      1. Create a cohort by going to Site administration > Users > Accounts > Cohorts and selecting the "Add new cohort" tab.
      2. Enter the name for the cohort and click "Save changes"
      3. Back on the Cohorts page, click on the assign icon for the previously created cohort.
      4. In the Cohort members page, select one or more users in the Potential users section and add click on the Add button.
      5. Create a third course C
      6. Go to course C, and go to Course administration > Users > Enrolment methods.
      7. Click the dropdown menu under the enrolment methods and select 'Cohort sync'.
      8. In the Cohort sync page, select the previously created cohort in the Cohort dropdown menu.
      9. For the "Add to group" dropdown menu, select "Create new group".
      10. Click "Add method"
      11. Still in course C, go to "Course administration" > Users > Groups.
        Confirm that you cannot delete the group created by the enrol/cohort plugin

      Testing backup and restore for Course meta link enrol plugin

      1. Backup course B and restore it into a new course (i.e. course B2)
      2. Go to the restored course B2 and go to "Course administration" > Users > Groups.
      3. Make sure the undeleteable group created by Course meta link plugin is still locked.
      4. In course B, go to "Course administration" > Users > "Enrolment methods".
      5. In the Enrolment methods page, click on the Delete icon for the Course meta link row.
      6. Still in course B, go to "Course administration" > Users > Groups.
        Confirm that the group that was added using the Course meta link plugin has also been deleted.
      7. Do the same steps above for course B2.
        Confirm that the group that was added using the Course meta link plugin has also been deleted.

      Testing backup and restore for Cohort sync enrol plugin

      1. Backup course C and restore it into a new course (i.e. course C2)
      2. Go to the restored course C2 and go to "Course administration" > Users > Groups.
      3. Make sure the undeleteable group created by Course meta link plugin is still locked.
      4. In course C, go to "Course administration" > Users > "Enrolment methods".
      5. In the Enrolment methods page, click on the Delete icon for the Cohort sync row.
      6. Still in course C, go to "Course administration" > Users > Groups.
        Confirm that the group that was added using the Cohort sync enrol plugin has also been deleted.
      7. Do the same steps above for course C2.
        Confirm that the group that was added using the Cohort sync enrol plugin has also been deleted.
      Show
      Test with Course meta link enrol plugin Enable the "Course meta link" plugin by going to Site administration > Plugins > Enrolments > Manage enrol plugins and clicking the Enable icon for the "Course meta link" row. Create two courses, A and B Enrol users in course A Go to course B, and go to Course administration > Users > Enrolment methods. Click the dropdown menu under the enrolment methods and select 'Course meta link'. In the Course meta link page, select course A in the dropdown menu. For the "Add to group" dropdown menu, select "Create new group". Click "Add method" Still in course B, go to "Course administration" > Users > Groups. Confirm that you cannot delete the group created by the enrol/meta plugin Test with Cohort sync enrol plugin Create a cohort by going to Site administration > Users > Accounts > Cohorts and selecting the "Add new cohort" tab. Enter the name for the cohort and click "Save changes" Back on the Cohorts page, click on the assign icon for the previously created cohort. In the Cohort members page, select one or more users in the Potential users section and add click on the Add button. Create a third course C Go to course C, and go to Course administration > Users > Enrolment methods. Click the dropdown menu under the enrolment methods and select 'Cohort sync'. In the Cohort sync page, select the previously created cohort in the Cohort dropdown menu. For the "Add to group" dropdown menu, select "Create new group". Click "Add method" Still in course C, go to "Course administration" > Users > Groups. Confirm that you cannot delete the group created by the enrol/cohort plugin Testing backup and restore for Course meta link enrol plugin Backup course B and restore it into a new course (i.e. course B2) Go to the restored course B2 and go to "Course administration" > Users > Groups. Make sure the undeleteable group created by Course meta link plugin is still locked. In course B, go to "Course administration" > Users > "Enrolment methods". In the Enrolment methods page, click on the Delete icon for the Course meta link row. Still in course B, go to "Course administration" > Users > Groups. Confirm that the group that was added using the Course meta link plugin has also been deleted. Do the same steps above for course B2. Confirm that the group that was added using the Course meta link plugin has also been deleted. Testing backup and restore for Cohort sync enrol plugin Backup course C and restore it into a new course (i.e. course C2) Go to the restored course C2 and go to "Course administration" > Users > Groups. Make sure the undeleteable group created by Course meta link plugin is still locked. In course C, go to "Course administration" > Users > "Enrolment methods". In the Enrolment methods page, click on the Delete icon for the Cohort sync row. Still in course C, go to "Course administration" > Users > Groups. Confirm that the group that was added using the Cohort sync enrol plugin has also been deleted. Do the same steps above for course C2. Confirm that the group that was added using the Cohort sync enrol plugin has also been deleted.
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-51202-master

      Description

      With the current strucutre, plugins can't know which groups they've created unless they track the ids or idnumbers on their own tables.

      Having "component" and "itemid" for groups, just like MDL-31973 did for groups members, would make easier for integrations with external systems to distinguish groups they can update/delete from the ones from other plugins.

      It will help resolve MDL-58785, as there will be an easier way to found which groups were created by enrol_database.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                danielneis Daniel Neis Araujo
                Reporter:
                danielneis Daniel Neis Araujo
                Peer reviewer:
                Andrew Nicols
                Participants:
                Component watchers:
                Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                6 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: