CredentialType needs a new attribute named something like "duration". When a credential is created, its expiration date should be set that far into the future.
Furthermore, we need a new restriction: when checking for completion of a CredentialType, all required achievements must have been completed no more than duration ago. So if the duration is 1 year, it will:
Check that all required achievements have been completed in the past year
Set the date_expires attribute to one year from today.
Lastly, we need a daily task to be run by celery that looks for 'granted' credentials that should be set to expired and does so.
CredentialType needs a new attribute named something like "duration". When a credential is created, its expiration date should be set that far into the future.
Furthermore, we need a new restriction: when checking for completion of a CredentialType, all required achievements must have been completed no more than
duration
ago. So if the duration is 1 year, it will:Lastly, we need a daily task to be run by celery that looks for 'granted' credentials that should be set to expired and does so.