I have three courses at the moment and one Meta course that receives the students from these three courses. When I first set up the Meta course it correctly imported all the students from the three child courses.
I would now like to add a new child course to the meta course. However, it does not import the students. It only seems to import when it is first set up, or if a new student is added to the child course. However, if a new child course is added it will not automatically add the students already enrolled in that child course.
So, for example. Meta Course receives its students from Child Course A. If I then add Child Course B to the meta course, it does not import the students already in Child Course B. It will only add new students added to Child Course B after the Meta course has been set up.
What am I doing wrong?
Nikki
Thats right Penny. If the Meta course ALREADY exists, and then I want to add another child course to the existing Meta course, it does not pick up the students from the newly added course. It does pick up students that are added to the child course AFTER the child course wazs added to the Meta course. Gosh that sounds confusing.
I will try an example.
I have a Meta course already existing called Documents. It has a child course called Farming 1. The students from Farming 1 appear perfectly in the Meta course.
Now I add a new child course - Transport 1 - to the Meta course Documents. None of the students in Transport 1 are in Documents. The only way to get them to appear in Documents is to unenrol them from Transport 1 and then reenrol them again.
Now if I add a new student - Mary Smith - to Transport 1 she does appear in Documents.
I am using a sql database - not able to see the version although I am pretty sure it is the latest available. I am using Moodle 1.5.2.
Thnaks, Nikki
I will try an example.
I have a Meta course already existing called Documents. It has a child course called Farming 1. The students from Farming 1 appear perfectly in the Meta course.
Now I add a new child course - Transport 1 - to the Meta course Documents. None of the students in Transport 1 are in Documents. The only way to get them to appear in Documents is to unenrol them from Transport 1 and then reenrol them again.
Now if I add a new student - Mary Smith - to Transport 1 she does appear in Documents.
I am using a sql database - not able to see the version although I am pretty sure it is the latest available. I am using Moodle 1.5.2.
Thnaks, Nikki
I ran into the same situation. The students already enrolled in a class did not show up in the meta course but the ones that I enrolled after attaching the course to a metacourse did appear in the meta course's participants list.
Using Moodle 1.5.2 + (2005060222) with MySql and PHP Version 4.3.2
Using Moodle 1.5.2 + (2005060222) with MySql and PHP Version 4.3.2
OK. I understand that situation you are explaining.
> I am using a sql database - not able to see the version although I am pretty sure it is the latest available. I am using Moodle 1.5.2.
This is important. Is it mysql? or postgresql? You should be able to see that from $CFG->dbtype in your config.php.
Also, the version of the database is really important. I know you said latest available, but I really need to know. Can you maybe ask your sysadmin?
Also, exact version of moodle. If you go to /admin you should see at the bottom something like
Moodle 1.5.2+ (2005032400)
(I just made up that number in the brackets, but it will look sort of like that)
The difference between 1.5.2 and 1.5.2+ is also really important.
> I am using a sql database - not able to see the version although I am pretty sure it is the latest available. I am using Moodle 1.5.2.
This is important. Is it mysql? or postgresql? You should be able to see that from $CFG->dbtype in your config.php.
Also, the version of the database is really important. I know you said latest available, but I really need to know. Can you maybe ask your sysadmin?
Also, exact version of moodle. If you go to /admin you should see at the bottom something like
Moodle 1.5.2+ (2005032400)
(I just made up that number in the brackets, but it will look sort of like that)
The difference between 1.5.2 and 1.5.2+ is also really important.
Um.
You need to read this thread:
http://moodle.org/mod/forum/discuss.php?d=28998
In short, metacourses won't work with such an older version of mysql. I didn't realise that when I wrote it but it's come to light now that mysql doesn't support that sort of complicated JOIN.
Not sure what to do here - the option is a rewrite to process all the enrolments in php but it would be nightmarishly slow for large installations.
Martin D?
At any rate, please go to bugs.moodle.org and add a bug. If you can, assign it to me. (mjollnir)
Edit: I guess one option is add metacourse maintenance to cron.php and do it the slow way (in php) but I'm not sure that's such a good idea either really.
You need to read this thread:
http://moodle.org/mod/forum/discuss.php?d=28998
In short, metacourses won't work with such an older version of mysql. I didn't realise that when I wrote it but it's come to light now that mysql doesn't support that sort of complicated JOIN.
Not sure what to do here - the option is a rewrite to process all the enrolments in php but it would be nightmarishly slow for large installations.
Martin D?
At any rate, please go to bugs.moodle.org and add a bug. If you can, assign it to me. (mjollnir)
Edit: I guess one option is add metacourse maintenance to cron.php and do it the slow way (in php) but I'm not sure that's such a good idea either really.
Hi Penny,
We are experiencing the same problem here with MySQL version 4.0.25 using LDAP for enrolment. However, that is not the issue. It is a problem with the function sync_metacourse().
Please see Bug 3943 for more info and a unified diff for moodlelib.php. The enrol field for mdl_user_students needs to be set to something else; otherwise the LDAP enrol code thinks it needs to unenroll students. I changed it to 'meta' and it seems to be working fine.
Please inform if this is an appropriate fix, because I may have overlooked something that I'm not aware of.
regards,
Jeff
We are experiencing the same problem here with MySQL version 4.0.25 using LDAP for enrolment. However, that is not the issue. It is a problem with the function sync_metacourse().
Please see Bug 3943 for more info and a unified diff for moodlelib.php. The enrol field for mdl_user_students needs to be set to something else; otherwise the LDAP enrol code thinks it needs to unenroll students. I changed it to 'meta' and it seems to be working fine.
Please inform if this is an appropriate fix, because I may have overlooked something that I'm not aware of.
regards,
Jeff
Nikki - I have fixed metacourses in the latest 1.5.2+ build for mysql 3.23. Please upgrade next time there's a build, or to latest cvs, whichever you are using. Note that the builds are built once daily (I think) and there's a time delay between anonymous cvs and developer cvs.
Once you've upgraded, please confirm the fix works
Once you've upgraded, please confirm the fix works
you need lib/moodlelib.php - either change into your cvs checkout and type
cvs up lib/moodlelib.php
or just cvs up to get the latest version...
Note: sf.net seems to be down again, hopefully cvs will be back up soon... it's been very erratic over the last few days.
It's probably something like
http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/lib/moodlelib.php (guessing)
cvs up lib/moodlelib.php
or just cvs up to get the latest version...
Note: sf.net seems to be down again, hopefully cvs will be back up soon... it's been very erratic over the last few days.
It's probably something like
http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/lib/moodlelib.php (guessing)
You need this file:
http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/lib/moodlelib.php?rev=1.565.2.29&only_with_tag=MOODLE_15_MERGED&view=markup
There's a download link at the top.
Best to do it straight from cvs though
http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/lib/moodlelib.php?rev=1.565.2.29&only_with_tag=MOODLE_15_MERGED&view=markup
There's a download link at the top.
Best to do it straight from cvs though
OK, I must be missing something here. I've upgraded to the latest CVS version of 1.5...I'm running MySQL 4.X. Here's what I've done:
1. Set up a metacourse (call it "Master").
2. Set up a normal corse (call it "Normal").
3. In "Master," I've selected "Import Course Data" and chose "Normal."
4. Set up a test student, enroll in "Normal."
So is test student supposed to auto-magically appear in "Master" at this point? Just in case the update mechanism is tied to cron.php, I ran that as well. Still no students in "Master."
UPDATE:
OK, this might help someone who was confused as I was: "Import Course Data" doesn't import enrollments. You actually have to click on "Students" (yes, I know there are no students to speak of), which then allows you to select the courses you want to import enrollments from.
It would probably be more intuitive if the "Students" link was changed to something like "Import Enrollments".
--Brian
1. Set up a metacourse (call it "Master").
2. Set up a normal corse (call it "Normal").
3. In "Master," I've selected "Import Course Data" and chose "Normal."
4. Set up a test student, enroll in "Normal."
So is test student supposed to auto-magically appear in "Master" at this point? Just in case the update mechanism is tied to cron.php, I ran that as well. Still no students in "Master."
UPDATE:
OK, this might help someone who was confused as I was: "Import Course Data" doesn't import enrollments. You actually have to click on "Students" (yes, I know there are no students to speak of), which then allows you to select the courses you want to import enrollments from.
It would probably be more intuitive if the "Students" link was changed to something like "Import Enrollments".
--Brian