Added utility functions to check for sold out and expired courses