Course meta link - users not removed from parent?

Course meta link - users not removed from parent?

per Marty Gilbert -
Nombre de respostes: 7
Imatge Core developers

Hi All -

I'm using a Course meta-link to teach 2 sections of the same course. These child courses are hidden, and I'm using a the course meta links to drive the enrollment of the parent course.

A student dropped the course, and was subsequently removed from the child course, but not removed from the parent course. Is this the expected behavior?

From the documentation, I know:

"When new users are enrolled to the source (child) course, they will be automatically brought into the current target (meta)course"

But it doesn't say anything about when users are removed from the child course.

Help?

Thanks in advance

Marty


[ Edit: I'm using Moodle 3.2 ]

Mitjana de qualificacions: -
En resposta a Marty Gilbert

Re: Course meta link - users not removed from parent?

per Fred Woolard -

I might be mistaken, but I think the next time your site's cron task is run, the metalink enrol plugin will sync enrolments between parent and child courses. If it has indeed run, and the enrol for that one student remains, is there possibly a separate (e.g. manual) enrolment in place for that student in the parent course?

En resposta a Fred Woolard

Re: Course meta link - users not removed from parent?

per Marty Gilbert -
Imatge Core developers

Hi Fred! And thanks for the response.

The student was enrolled via Ellucian's ILP plugin (we use Colleague), and unenrolled the same way. Cron has been running regularly (every minute) all day long, and the cron logs look clean to me ("Running cron for enrol_meta...").

I don't see a manual enrollment in the parent course, and the student is no longer in the child course (enrolled/unenrolled manually via ILP).

Anywhere else I should look?

Thanks for the help,

Marty

En resposta a Marty Gilbert

Re: Course meta link - users not removed from parent?

per Fred Woolard -
Look in the enrol plugin's settings (Site Administration->Plugins->Enrolments->Course meta link) where you will see a list of roles that ARE NOT sync'd. It's unlikely since the student was enrolled by virtue of the plugin, but if someone has come along and selected the student role, then none of your student un-enrollments would sync from child to parent. Worth taking a look. And might as well verify the rest of the settings while you're there.
En resposta a Fred Woolard

Re: Course meta link - users not removed from parent?

per Marty Gilbert -
Imatge Core developers

meta course enrollment settings


Thanks again, Fred.

I'm choosing to only sync the 'Student' role, but the other options look fine to me. The unenroll action (disable course enrollment and remove roles) sounds like the correct setting, no?

I'm at a loss.

Marty

En resposta a Marty Gilbert

Re: Course meta link - users not removed from parent?

per Fred Woolard -

Out of thoughts on the _why_ aspect. Reading lib code for meta, looks like if the enrol instance is updated, then enrol_meta_sync() is called. Suppose you don't actually have to change anything about the instance, just click the edit (cog), then without making any changes click save? If still failing to remove the student, then you know as well as I there's some condition  preventing. At this point, I begin checking the underlying data, then step-through the debugger.

En resposta a Marty Gilbert

Re: Course meta link - users not removed from parent?

per Emma Richardson -
Imatge Documentation writers Imatge Particularly helpful Moodlers Imatge Plugin developers

How often is cron running?  It probably won't remove until Cron runs...

En resposta a Emma Richardson

Re: Course meta link - users not removed from parent?

per Marty Gilbert -
Imatge Core developers

Hi Emma -

See my above response to Fred - Cron is running every minutes, so it has had ample opportunity to unenroll the user.

I took Fred's advice and re-saved the settings on the enrollment page, and - fluke or not - things seem to be working properly now. We'll chalk it up to gremlins and move on, seeing as how I cannot reproduce the issue.

Thanks to Emma and Fred for their helpful responses,

Marty