A third party is providing an XML feed of courses for me to integrate into an existing channel, which I'm planning to use Andrew Weaver's excellent Datagrab module for. My problem is that some of these courses are ongoing, and have no expiry date, whilst others have a definite expiry date. The current course list on the site is ordered by expiry date (so that the closest course chronologically is listed first, in descending order).

The client I'm doing this for wants to add a +3 month expiry date to these entries that come through as ongoing, and then assess them regularly to refresh that +3 month date when they're about to expire.

I thought about doing this via the query module, or even via php, either as a nightly, or as lookup when someone requests this courses page (although I think that would be expensive performance-wise, I don't need to be looking at them constantly). I can add a category to these entries that makes it easy to pull them out.

I'm wondering if anyone else in the community can think of a good way of handling this? These entries are going to bubble up the listings as their expiry date nears, and then get pushed right down again. I'm not sure this is the best way of doing it, but the client is adamant that they want them integrated into the main list.

Any ideas or suggestions most welcome!

1 Answer 1


How about adapting one of the import modules from datagrab. From what i get, you could duplicate and edit an import for your own needs. If expiration_date == 0 then add 3 months. That way it will keep in sync and set the expiration on import.

  • Interesting idea. In which case I don't need 3 months, maybe just +1 month, and updating those entries each time the nightly job runs. I'll investigate this route, thanks GDmac! Commented Feb 1, 2013 at 15:40

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.