Commit 6a85cd1a by AsadAzam Committed by GitHub

Merge pull request #14712 from edx/TNL-6637-whitelist-logs

Added logs for adding/removing students from whitelist
parents 228eb510 9ae3a321
...@@ -2965,6 +2965,7 @@ def add_certificate_exception(course_key, student, certificate_exception): ...@@ -2965,6 +2965,7 @@ def add_certificate_exception(course_key, student, certificate_exception):
'notes': certificate_exception.get('notes', '') 'notes': certificate_exception.get('notes', '')
} }
) )
log.info(u'%s has been added to the whitelist in course %s', student.username, course_key)
generated_certificate = GeneratedCertificate.eligible_certificates.filter( generated_certificate = GeneratedCertificate.eligible_certificates.filter(
user=student, user=student,
...@@ -3016,6 +3017,7 @@ def remove_certificate_exception(course_key, student): ...@@ -3016,6 +3017,7 @@ def remove_certificate_exception(course_key, student):
except ObjectDoesNotExist: except ObjectDoesNotExist:
# Certificate has not been generated yet, so just remove the certificate exception from white list # Certificate has not been generated yet, so just remove the certificate exception from white list
pass pass
log.info(u'%s has been removed from the whitelist in course %s', student.username, course_key)
certificate_exception.delete() certificate_exception.delete()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment