Cohort Sync-Removed Enrollment-SQL

Cohort Sync-Removed Enrollment-SQL

by Shirley Gregorczyk -
Number of replies: 4
Picture of Particularly helpful Moodlers

I created a very simple query using the wonderful queries on the ad-hoc contributed reports page.

I am using the %%FILTER_COURSEENROLLEDSTUDENTS%% statement to limit the data to only enrolled students.

This was working swell, until I removed one of the existing students from the cohort.

The Moodle core reports, Activity Completion, Course Completion, Participants and Grades all have the correct number of students.

My query however, has the "extra" student that was removed from the cohort.

How do I get the queries to align to the current enrolled students after the cohort has been modified?

Kind Regards

Average of ratings: -
In reply to Shirley Gregorczyk

Re: Cohort Sync-Removed Enrollment-SQL

by Randy Thornton -
Picture of Documentation writers
Smells like a cache problem. Since the filter is pulling that data itself apart from and instead of the actual code, it is probably working with cached data. If you flush the caches does it correct itself?
In reply to Randy Thornton

Re: Cohort Sync-Removed Enrollment-SQL

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers
The cache clean-up runs frequently, but I just manually ran it again.
The data did not correct itself.
In reply to Shirley Gregorczyk

Re: Cohort Sync-Removed Enrollment-SQL

by Randy Thornton -
Picture of Documentation writers
Hm. And the student removed from the cohort is definitely no longer in the course? I think the cohort sync needs to run to pull them out of the course.

I'd be really surprised if the plugin was actually aware the user was in a cohort. It should just be looking at the user_enrollments table. This is working okay for me in 3.10 with the latest version of the plugin. (Attachments, one is the CR xml file).


Attachment screenshot_8932.jpg
Average of ratings: Useful (1)
In reply to Randy Thornton

Re: Cohort Sync-Removed Enrollment-SQL

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers
Thank you for your diligence, as always it is most helpful.
Kind Regards.