Opigno User Expiration

PC
Forums
Hello Opigno, The expiration app doesn't seem to work. When we set a User expiration amount and a user expiration type, nothing happens, after the period, the user is still subscribed. I have notice in the function that deals with this a strange repetition : if ((isset($group->opigno_user_expiration_amount[LANGUAGE_NONE])) && (isset($group->opigno_user_expiration_amount[LANGUAGE_NONE]))) { I have not tried this app with a fixed date, since this is not our use case. Thanks
admin

Hi Pc,

Hi Pc, I just tested the app and it works perfectly. I installed the app and for a course set a user with an expiration date in the past. When i ran the cron he was remove correctly. Did you run the cron? Best regards
PC

Hi,

Hi, I've checked the rule, and it was only looking for course content type, we are working with classes, so i've added the class type to the rule, run the cron...and nothing happened. Is it only for courses ?
PC

Sorry i had not noticed that

Sorry i had not noticed that in your answer, you added a fixed date, we want it to work on a period, without entering a fixed date, only user expiration amount and expiration type
admin

Hi Pc,

Hi Pc, Currently it is only for courses, but you can just look at the code and replicate for classes. In the install file associate create the field instances for the class aswell and in the module file remove the part if ($node->type=="class") { $form['membership_fields']['opigno_user_membership_exp']['#access'] = FALSE; } And in the rule check if it is course or class. That should be enough Best regards
PC

Hello admin

Thanks for your answer, I've done what you said : Duplicated module (with other name), renamed functions accordingly, removed the line as said above, changed the rule, but it does nothing. I had thought it would work since in the app description it's written : "A new field in the course (or class) administration interface will be available..."
Profile picture for user James Aparicio
James Aparicio

Hi PC

Hi PC

You managed to do this?

 

Best regards