Group Expiration

Overview

The LearnDash Group Expiration module is part of the Pro Suite of modules for the Uncanny LearnDash Toolkit. It provides a means to expire course access for an entire group and to notify them in advance of the expiration. This is useful when a number of organizations are set up with their own LearnDash Groups and you sell access to courses for a large group over a defined period of time. We see it used most often when organizations pay outside of WordPress for a bulk license to courses.

Usage

After turning the module on, there are several settings to configure in the module settings modal, including

  • Whether or not to send an expiry email
  • How many days before expiry to send the email
  • Whether or not to trash groups entirely after expiration, and if so, how many days after expiry

group_expirationTo set an expiration date and (optionally) an expiration message that’s unique to each group, navigate to the list of LearnDash Groups in LearnDash LMS > LearnDash Groups. You’ll see that a new column is added for Expiration Date. If access expires in the future, you’ll see an expiry date listed here. If a notification email was sent, this will be listed here as well. If access has already expired, the date and time of expiry is added to the column.

To set or change the expiration date and expiration email, edit a LearnDash Group. When the module is enabled, a metabox for Expiration Date is added to the LearnDash Group page. Click the date field to select an expiration date from the calendar.

Please note that the default value of the “days before expiry” is 7 days (if no value is set, this is what is used). If the expiry will happen within 7 days when it’s first set, it means no expiration will be set (since it’s within the date range) and no expiration or email behaviours will be triggered.

If you decide to trash groups after expiry, don’t forget to set how many days after expiry the group should be moved to the trash. This option is useful for keeping the list of groups organized and avoids clutter created by old, invalid groups. Please note that 30 days after being moved to the trash, groups are permanently deleted.

Shortcode

The following shortcode outputs the expiration date of the current user’s group:

[uo_group_expiration_date]

If the user is in exactly one group with an expiry date set the expiry date of that group will be displayed.

If the user is in more than one group with an expiry date set, the shortcode won’t display anything.  For this case, you can manually specify a group ID in the shortcode using the group_id parameter:

[uo_group_expiration_date group_id="1234"]

to display the expiry date of a specific group.  Even if the group_id is specified, nothing will be displayed to users that are not members of the specified group.

The shortcode will display the expiry date even if the date has already passed.

The following shortcode outputs the time remaining until the expiration date of the current user’s group:

[uo_group_expiration_in]

If the user is in exactly one group with an expiry date set, a countdown to the expiry date of that group will be displayed.

If the user is in more than one group with an expiry date set, the shortcode won’t display anything.  For this case, you can manually specify a group ID in the shortcode using the group_id parameter:

[uo_group_expiration_in group_id="1234"]

to display a countdown to the expiry date of a specific group.  Even if the group_id is specified, nothing will be displayed to users that are not members of the specified group.

To replace the default text “Group Access Expires in ” that appears before the countdown, use the pre_text attribute:

[uo_group_expiration_in pre-text=""]

Customizing the Notification Email

Beneath the expiration date is an Expiration Email metabox. You can set both the subject line and body for the notification email. In the body of the email, you can include variables for the user’s display name (“%Display Name%”), group name (“%LearnDash Group Name%”) and expiration date (“%Expiration Date%”). Variables are not case sensitive, but we recommend you copy and paste them from the list beneath the body text area. Use the Test Email button to sent a sample expiration email to the site administrator.

expiration_email

Usage Notes

  • For expiry to take effect, you must set a date in the future. Group courses will be removed at midnight on that date.
  • To reactivate an expired group, set a new date in the future. Please note that courses will not be restored automatically; they must be added back to the group.
  • The notification email is sent as a cron job, which is only triggered when users visit the site. If no-one visits the site on a date when emails would normally be sent (this is common on development and Staging sites), emails won’t be triggered until someone next visits.

 

25 replies
    • Ryan
      Ryan says:

      Hi Jean, it depends on who you want to have access to the data. The data isn’t deleted. Admins can still access it, Group Leaders cannot.

      Reply
    • Ryan
      Ryan says:

      LearnDash only supports course expiration and our plugin only adds group expiration support. Even if you could set expiration behaviours for lessons, topics and quizzes, access to a course through the group would override it anyway (I mention that since the comment is posted for a group article).

      Reply
  1. Marion
    Marion says:

    Can a learner register with a code for an expired group? Also, what can a learner who is a member of an expired group expect to see or be able to access if they log in after the group expires, i.e., courses, course certificates?

    Reply
    • Ryan
      Ryan says:

      Learners could register for a group with a valid code, yes. Expiry just means all courses were removed from the group. So while the user would be added, no access to courses would be granted. A user with no course access could see certificates but could not access courses.

      Reply
  2. Nachi
    Nachi says:

    Hi,
    When I create a group and assign the learn dash course then I set the expiry date to that group.

    If Group is expired at the same time the course access will expired is that right?. So users should not access those courses.

    Kindly guide me

    Reply
    • Ryan
      Ryan says:

      Hi Nachi, the best way to reach us with support questions is via support ticket from your account or email to support@uncannyowl.com.

      This module for group expiration effectively removes course access and reporting for the group on the expiration date. Students will no longer have access to courses granted by the group after expiry (unless they are enrolled in the individual courses as well, in which case they will retain access). Let us know if you still have questions about the process.

      Reply
  3. Kent S.
    Kent S. says:

    I’d love to see an option to set a default expiration message. Currently if I turn this feature on the body of the email message is empty. Since group access is a product I’m selling there are potentially many groups being created, each of which needs a default group expiration message entered.

    Reply
    • Ryan
      Ryan says:

      Hi Kent, we’ve had a few requests for this. We’ll see if we can include something in future, as there have been a handful of similar requests. Thanks for your feedback.

      Reply
  4. Netta
    Netta says:

    Hi,

    Is it possible to set the expiration depending on the user’s enrollment day? We would like to set courses to expire after one year from enrollment, not spesific date and would like to know if its possible with this module. Thank you in advance.

    Reply
    • Ryan
      Ryan says:

      That is unfortunately not possible. It is something we’re considering for a future release but there is some associated complexity.

      Reply
  5. Helma Kranz
    Helma Kranz says:

    Hi, I am assuming this is still limited to “date only”, no time, correct? If so, can you please clarify what time it expires? So if it’s set to expire 12/19, will it be midnight Eastern time or server time or whatever time zone you are in?!

    Also, can you clarify a comment you make above about “removes course access and reporting for the group on the expiration date. Students will no longer have access to courses granted by the group after expiry (unless they are enrolled in the individual courses as well, in which case they will retain access)”- how would I have to manage my settings in order to enroll students in the group, but not the course? i am not following that, I don’t think…
    I do have a group with just 1 course and that group is set to expire, limiting access. But I am now worried that users still have access due to being enrolled in the course. Can you clarify the process for me? Thanks so much!

    Helma

    Reply
    • Ryan
      Ryan says:

      Hi Helma,

      You should see the time of expiration (midnight) and day on the edit group page; see this screenshot: https://www.uncannyowl.com/wp-content/uploads/2016/07/group_expiration.png. It will go by WordPress time.

      If users are in a course directly then their access won’t change. This expiration option removes courses from the group on the expiration date, it does not modify individual user access. So, if users have access independent of the group, they will retain it–and this is the normal and expected approach. If you manage course access independently then reports for the users for individually enrolled courses wouldn’t show up for Group Leaders anyway so the value of using groups wouldn’t really be there.

      Reply
  6. Tina
    Tina says:

    Our users need to repeat courses every year. If we set an expiry date for a course when we give them a new code they cannot gain access to the course as it still shows as expired. If we remove them from the original group and add them to a new group they cannot start the course again as it shows their original progress.The only way to do it is to manually delete their data from the backend but this is hugely time consuming.
    This is a major problem for us. Please can you advise on how we could surmount this problem.

    Reply
    • Ryan
      Ryan says:

      It’s unfortunately a common problem for LearnDash users; the answer really depends on how you prefer to grant users access to the course again. Have a look at https://www.uncannyowl.com/annual-compliance-programs-with-wordpress/ as a starting point, it is older but has some guidance that’s still applicable. The Toolkit Pro has the progress reset module that allows users to self-reset progress when starting a new year for the course, then Uncanny Automator offers more triggers for reset (most commonly repurchase of a course).

      Reply
  7. Sally
    Sally says:

    Thank you for changing the expiration time to be midnight *WordPress/website time* instead of UTC!!
    That is such a great improvement for us and we so appreciate it.
    Warmly,
    Sally

    Reply
  8. adam king
    adam king says:

    Hi there, is it possible to set expiration date per enrolled user, so for example:
    Person 1 has 7 days to complete
    Person 2 has 10 days to complete
    etc
    Thanks
    Adam

    Reply
    • Ryan
      Ryan says:

      It wouldn’t work with this module, I’m afraid. If you use additional plugins (e.g. WP Fusion, Uncanny Automator) there are some options that would allow you to control group removal/expiration on a more granular basis.

      Reply
  9. Linda
    Linda says:

    Hi Ryan,

    Great option! Will the expiration date remove the members of the group to all their assigned courses? Or will it only remove the members from the course linked to the group?

    Thanks

    Linda

    Reply
    • Ryan
      Ryan says:

      Hi Linda, the expiration effectively removes courses from the group on expiration, which thereby removes access to courses associated with the group (assuming the user isn’t also individually enrolled in the courses). Hopefully that clarifies things a bit.

      Reply
  10. Parth Kundariya
    Parth Kundariya says:

    Hi Guys,

    I just wanted to notify admin or some list of people for expiration of group access. I do not want to notify group leaders and users.

    Is that possible?

    Thanks
    Parth

    Reply
    • Ryan
      Ryan says:

      Good question. Right now this is not possible, emails go to Group Leaders or students in a group only.

      We have captured your request (add a setting to the module to only send expiration emails to the site admin–we would start with that) and will consider it for a future release.

      Reply

Comments/Questions

Please note that this is not a support forum. If you are experiencing issues on your site, please open a support ticket instead. Site-specific support questions submitted as comments will be unanswered.

Leave a Reply

Your email address will not be published. Required fields are marked *