Days Until Course Expiry

Overview

The Days Until Course Expiry module is part of the Pro Suite of modules for the Uncanny LearnDash Toolkit. Out of the box, LearnDash includes a shortcode that shows the date on which access to a course expires for a learner. The shortcode/block in this module lets you show the number of days until expiry instead.

Shortcode/Block

[uo_expiration_in]

Block Name: Days Until Course Expiry

Just add this shortcode/block to any page inside a LearnDash course (including a sidebar) and the number of days until expiry is listed.

To show the number of days until expiry on a non-course page, add a course-id attribute that includes the post ID of the associated course. Here’s an example, where “123” is the ID of the course:

[uo_expiration_in course-id="123"]

 

Attributes

Adding the shortcode/block alone adds the text “Course Access Expires in X days”, where X is the number of days until expiry. You can customize the message by including a pre-text attribute in the shortcode/block. For example:

[uo_expiration_in pre-text="Your access will expire in:"]

will change the text to “Your access will expire in: X days”. If you add the shortcode/block on a page or post not associated with a course, you must also include the course-id attribute to specify the course to which the expiration date applies.

Note: On the last day of access, the number of days will show “0”. If  course access has expired, no text will be displayed (this is relevant when the shortcode/block is displayed on a course page of a closed course, for example).

10 replies
    • Ryan
      Ryan says:

      To use this shortcode make sure you have Pro installed and the module turned on. I don’t see a license for this email address, so if you continue to have trouble make sure you log a support ticket through your account on our site and we can take a closer look.

      Reply
    • Ken Young
      Ken Young says:

      You can use the “pre-text” attribute to change the text that comes before the number of days, but the rest is currently not translatable. We’ll make sure the entire phrase is translatable in the next release. Thanks!

      Reply
  1. Branden Croskery
    Branden Croskery says:

    How do we set an expiration date to courses/certificates? Our clients have to redo training every 3 years and need an expiry date to appear on their certificates – once their certificates expire they need to be able to go back in and retake the course and be awarded a new certificate.

    Reply
    • Ken Young
      Ken Young says:

      Unfortunately, that’s not currently possible with any of our current plugins, but we are considering the addition of that kind of functionality to our Continuing Education Credits plugin. Stay tuned!

      Reply
    • Ryan
      Ryan says:

      Yes, for this you should use the free LearnDash Notifications plugin (available from your account on learndash.com). It works both with regular expiry dates and our group expiration behaviours in the Toolkit Pro plugin.

      Reply
  2. Steven
    Steven says:

    I have turned on the module and inserted the code. The course timer is set to 30 days. Testing it with my user and it does not display on the course. Am I missing something?

    Reply
    • Ryan
      Ryan says:

      For support issues it really makes it easier for us to track things if you can submit a ticket. For this one, is the user an admin or Group Leader? Both might allow access overrides that would negate expiration. Is expiration set at the course or group level, or perhaps even both? Is the course a type other than “open”? If you can follow up in a ticket with more details about the test user, enrollment, expiration and the shortcode you’re using we can take a look for you.

      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