How to change user's course enrollment date if they are enrolled with the Cohort Sync method?

How to change user's course enrollment date if they are enrolled with the Cohort Sync method?

by Rui Hu -
Number of replies: 4

I know that for manually enrolled users in a course, I can click on the gear icon next to user to change their enrollment date. See the last student in this screenshot. 

But if the users were enrolled with the method of cohort sync, I cannot seem to find a way to change their enrollment dates. Is it even possible to change user's enrollment date if they were enrolled with Cohort Sync method?


Average of ratings: Useful (1)
In reply to Rui Hu

Re: How to change user's course enrollment date if they are enrolled with the Cohort Sync method?

by Jeremy Callan -

Hey I have the same issue, is there a work around or custom code available?

In reply to Jeremy Callan

Re: How to change user's course enrollment date if they are enrolled with the Cohort Sync method?

by Amit Sharma -
Hi Jeremy,

we have checked the issue and fixed with custom code change in cohort enrollment method.
enrol/cohort/locallib.php inside enrol_cohort_sync function line 208 replace with below code.
$enrollstart=time();
$plugin->enrol_user($instance, $ue->userid,$instance->roleid,$enrollstart);

Thanks,
Amit Sharma
Average of ratings: Useful (3)
In reply to Amit Sharma

Re: How to change user's course enrollment date if they are enrolled with the Cohort Sync method?

by Syed HameedUllah -
Thanks Amit, 🙂
I was also facing the same issue, This solution fixed it.