Posts made by Jerry Lau

Hello folks.

We are on 3.9.4.x and I noticed in a lot of courses, we have students enrolled in more than one method!

In other words, the student was enrolld in a course via more than one enrolment method (unusual, but possible). 

see image attached.

How can I write an sql to clean this up and change all enrolment types who have either or all the courses' "database", "selfenrol" enrolment id and update it  to their course's 'manual' enrolment id?

I believe i need to loop through them but don't know which tables I need to hit and update them.

thanks!

capture multiple enrolment methods




Average of ratings: -

Hello folks.

running redhat 6.8, mysql 5.7.31 , php 7.2.34.x and moodle 3.9.4+

we are cleaning up our external database enrolments and noticed this in our plugin setting

External database1133 / 7652


Our external db enrolment table is emptied out nightly and renamed as "manual" and that might have posed a problem in cleaning up?

What is the query to find the second one (7652 records)? I think I got the query for the first one but not the 2nd one.

I believe the first one is:

select count(courseid), enrol from mdl_enrol where enrol like '%atabas%' group by courseid, enrol desc;

just need the 2nd one so i can change them to manual LOL

trying to clean this up


thanks!

Attachment dupes.PNG
Average of ratings: -

Hello folks.

running redhat 6.8, mysql 5.7.31 , php 7.2.34.x and moodle 3.9.4+

we are cleaning up our external database enrolments and noticed this in our plugin setting

External database1133 / 7652

what do each of these figures mean?

Our external db enrolment table is emptied out nightly and renamed as "manual" and that might have posed a problem in cleaning up?

What is the query to find these 7652 records?

Thanks



Average of ratings: -