So I am a little confused on trying to setup these meta link metacourses.
As an example, we currently have the following existing courses with students already registered:
I want to setup the following new metacourses which do not contain any material:
If somebody enrols in Semester 1 then I want them to be enrolled in Class 101 and 102 and 103.
If somebody enrols in Semester 2 then I want them to be enrolled in Class 104 and 105 and 106.
If somebody enrols in Semester 3 then I want them to be enrolled in Class 107 and 108 and 109.
If somebody enrols in Full Year then I want them to be enrolled in Class 101 and 102 and 103.
I do NOT want people already registered in any of the existing classes to be registered into these new metacourses. So if somebody is enrolled in Class 101 they should NOT automatically be in Semester 1 (since they may not be enrolled in 102 or 103).
I understand that I need to enable Meta Link enrolment method, which I have already done.
But when I setup my Semester 1 course use the Add Method to link it to say Class 101, it enrols everybody that was in Class 101 into Semester 1 which is exactly what I do not want to do.
The techniques have changed a little so you may want to start at the Course Meta Link doc to get a better idea. However, from what you have written there, you say you have a Class 101 in which you have students enrolled. Then you Add Class 101 via Meta Link, but you don't want everyone in Class 101 in the linked course. You have answered your own question here, or at least pointed yourself in the right direction. Don't add Class 101. Create new Class 101A, enrolling only those students you want in the Meta Linked course.
The problem with using Meta Links is that unless you have specific classes established, you have to create them. I suspect that you cannot use the Meta Linked course as you would like to. The idea is that if you have multiple classes using the same materials, why reinvent the wheel? The materials don't change much, but the classes that use them change, rapidly sometimes, so easier to swap classes than courses. I have had up to six classes in a single year level cohort using one course this way, and students never realized that they were sharing materials. Teachers were able to mark assignments, grades etc., easily.
Well after tons of playing around, I WAS able to get this to work the way I wanted it to!
I would explain my situation like this: all my child courses were already existing and I was trying to add a new parent course that had never existed before.
So the problem above was that I was adding Class 101 to Semester 1 and it was enrolling everybody in Class 101 into Semester 101. What I needed to do instead, was to add Semester 1 to Class 101 then add Semester 1 to Class 102 then add Semester 1 to Class 103. Now when somebody is enrolled in Semester 1, they are automatically enrolled into Class 101 and 102 and 103. But if somebody is added to only Class 101 (or was already in Class 101) they are NOT added to Semester 1.
Also the other issue I had is that I do not want these parent courses to be visible to students. I just want to enrol them into the parent course so they can automatically be enrolled into all of it's child courses. They way I got around this, is I set up a new top level category and made it a HIDDEN category. I then put all these new parent courses into this new hidden category.
Basically I followed this to set it up: https://docs.moodle.org/29/en/Course_meta_linkBut what you need to do in those docs is first go to the Site settings for Course meta link section.
Then you need to create your new top level hidden category.
Then you need to create your new parent courses (they can just be absolute bare minimum courses as they will not actually be used by any students, so you really just need to give it a name and then create it with whatever all the default values are).
So now you go back to the docs and follow the Course settings for Course meta link section, but you do this for each child course and add the parent course in as a Meta Link.
And also in the Course Meta Link settings page I set "Synchronise all enrolled users" option to NO/OFF.
Hope this helps somebody!