Fix Incorrect data in the database table certificates_generatedcertificate propagation.

EDUCATOR-4128
This commit is contained in:
Awais Jibran
2019-03-06 15:12:53 +05:00
parent 11e1631919
commit 81f1526786

View File

@@ -84,10 +84,11 @@ def _listen_for_failing_grade(sender, user, course_id, grade, **kwargs): # pyli
cert = GeneratedCertificate.certificate_for_student(user, course_id)
if cert is not None:
if CertificateStatuses.is_passing_status(cert.status):
cert.mark_notpassing(grade)
log.info(u'Certificate marked not passing for {user} : {course} via failing grade'.format(
cert.mark_notpassing(grade.percent)
log.info(u'Certificate marked not passing for {user} : {course} via failing grade: {grade}'.format(
user=user.id,
course=course_id
course=course_id,
grade=grade
))