Want to permanently enrol the students/teachers present in external database till now

Want to permanently enrol the students/teachers present in external database till now

by Shubham Singh -
Number of replies: 5

Hello,


I am using external database enrollment method for enrolling students/teachers to their respective courses. A table "enrollment_sync_moodle" is used which contains the list of students/teachers who are enrolled, if an entry from this table is removed, respective participant is also removed from the course on moodle. Now the issue is, I want to finally (permanently) enroll the table entries/participants at the end of each semester, so that new semester could start fresh with 0 entries in "enrollment_sync_moodle". I have searched a lot but I'm unable to find any solution to this problem.

Is there any way to freeze the table entries/make the entries till now permanent. I don't want participants to get unenrolled if their entries are removed at the end of each semester.

I am using Moodle 3.3.3. Kindly help.


Thanks in advance,

Shubham

Average of ratings: -
In reply to Shubham Singh

Re: Want to permanently enrol the students/teachers present in external database till now

by Chris Canning -

Hi Shubham,

I'm experiencing the same issue in my Moodle 3.4 installation where I use external databases for a similar purpose. I don't think there is anything you can do about it on your current version of Moodle.

Moodle 3.6 has used the new 'context freezing' feature, where course content & data are no longer editable.

I don't know the answer to the following question, but would anyone know:

Would a student be unenrolled from a 'context frozen' course if they are removed from external database entry table? 

My hope is 'context freezing' overrides the external database unenrolment and keeps the students record on the frozen course. 

If so, upgrading to 3.6 would solve a lot of problems!

Chris

In reply to Chris Canning

Re: Want to permanently enrol the students/teachers present in external database till now

by Shubham Singh -

Thank you so much Chris for replying.

As far as I have searched, we need to manually change the "enroll" field of moodle database table to "manual" so that when entries from external database are removed, students do not get unenrolled. I have not yet figured out exactly which table needs to be changed in my version of moodle.

Thanks,

Shubham

In reply to Shubham Singh

Re: Want to permanently enrol the students/teachers present in external database till now

by Chris Canning -

Hi Shubham,

By editing the Moodle database table, would this mean that users who were removed from the external database before semester end would still remain on the course?

Or does this mean that when entries are pushed from the external database that the enrolment method on Moodle isn't stated as 'external database', but rather 'manual enrolment'. Thus allowing teachers to remove user enrolments manually from their course?

Let me know if you make any progress!

Thanks


Chris 


In reply to Chris Canning

Re: Want to permanently enrol the students/teachers present in external database till now

by Shubham Singh -

Hi Chris,

By changing the enrol field in the moodle database to "manual", I mean that it would be done after semester end when enrollment's of students are stable and there are no more addition/removal of students, so that when we delete the external database entries, no changes are reflected on moodle course pages and the students could access the course material even after the semester ends. They would be marked as "manual enrolment" rather than "external database" post changes in the moodle database.

I am attaching a screenshot of conversation on similar topic for your reference. The table described in the screenshot is no more the same and I'm looking for the new schema. I will surely inform you if I make any progress.


Thanks

Shubham



Attachment snap.png
In reply to Chris Canning

Re: Re: Want to permanently enrol the students/teachers present in external database till now

by Shubham Singh -
I was not able to make any significant changes in moodle database that would serve my purpose. So I exported the final entries of external database to a CSV file and did flatfile enrollment at the end of the semester, so that students and faculty are permanently enrolled to the courses even when the respective enrollment entries are removed from external database.

Thanks smile