2

I am creating a Drupal 7 site where it tracks an employee's certification status, and notifies them if it has expired/is about to expire.

Currently, I have a content type called "Employee Info," where different types of certifications (under the "certifications" field, a list type) can be checked off for each employee, depending on which certs their job requires them to have.

For example, say I'm entering Billy John as a new employee who was certified in CPR, Cycling, but not Swimming. The CPR certification only lasts one year, and the Cycling cert lasts two. I would like it so the user can enter that Billy was certified for CPR on say, 1/1/15, and Cycling on 6/1/15, once their respective box is checked. Then, when 1/1/16 has rolled around, they get the notification that their CPR certification has expired (and likewise on 6/1/17 for their Cycling cert).

However, I am unsure how to do this, or if this is even the best approach to the problem.

Any help or guidance would be greatly appreciated!

1 Answer 1

0

Your question doesn't specify how such notifications should be implemented. Though there are at least 2 possible implementations:

  • Send an eMail to such employee when the time is right.
  • Create some type of alert when the employee visits the site.

Read on for more details about either implementation.

Create an alert

Enable the Menu Badges module, which can be used to add notifications to any menu item and/or menu tab of your choice. Here are some details about it (from its project page):

Provides a method for adding iOS-style badges to menu items. (see screenshot)

enter image description here

Because of how it integrates with the Views module, you basically reduce the solution specific to your question here to something like this:

  • Create an appropriate view about "expired certifications" (as in your question).
  • And create a menu item or menu tab for it.
  • Perform the required Menu Badges configuration to tell it which menu item/tab you used for it in your view.

Refer to the video Defining Menu Badges with Views in Drupal (from the module maintainer) for more details.

Send an eMail

You could use the Rules module to send an eMail when the time is right. To do so, have a look at the question about "Rule to store user's last post date and scheduled rule based 30 day reminder", which may be considered as a variation of this question here. My answer to that question should be pretty close to what you're looking for.

If you'd replace field_next_article by an "expiration date" of a certificate, you already have what's suggested in "Step 1". You should be able to reuse most of the Rules Component included in Step 2, and the Rule included in step 3, with only some minor changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.