Problem with re enrolment of paypal users

Problem with re enrolment of paypal users

by Sergio Carrasco Mayans -
Number of replies: 2

Hello,

I'm using Moodle 3.4 and I have a problem when a paypal enrolment ends. My courses have a monthly payment, and after that I want Moodle to ask for a new payment to access it.

In the configuration for the paypal module I've found three options of what to do when the subscription expires, and I've tried the last two of them, but I've found they don't do what I'm searching for. The first one disables the subscription, but the student can't enrol again in the same course (since they still show up in the course list but with a non active subscription), and the second one seems to keep things like the ranking but deletes the activity history (so all tests look as they were not done). Is there a way to unsubscribe a student, keeping their history, and allowing them to enrol again in the same course?

Average of ratings: -
In reply to Sergio Carrasco Mayans

Re: Problem with re enrolment of paypal users

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

I would be interested in finding out too.

In reply to Sergio Carrasco Mayans

Re: Problem with re enrolment of paypal users

by Renaat Debleu -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Sorry, but I think that standard Moodle does not provides a solution for your question.

The PayPal plugin was never developed with monthly payments in mind, but with multiple payment providers and enrolment methods in mind.  So every payment plugin only presents a payment option when a user is not enrolled in a course.

Have you tried to delete directly in the database the mdl_user_enrolments record for a payer? If this workaround is doing the job, it is no big deal to write a local plugin that deletes one month after payment his/her enrolment record.

Of course, test. test and test this workaround, because I do not have a clue about the possible side effects....