From e09728a3b2b5ebe8abf1aa3e6c74908c87ac85d0 Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Wed, 16 Jan 2013 17:48:46 -0500 Subject: [PATCH] Removing the unavailable tally It doesn't make sense to print out unavailable students since it will go negative as students unenroll --- .../certificates/management/commands/gen_cert_report.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lms/djangoapps/certificates/management/commands/gen_cert_report.py b/lms/djangoapps/certificates/management/commands/gen_cert_report.py index 93ee20b19f..198ed048fd 100644 --- a/lms/djangoapps/certificates/management/commands/gen_cert_report.py +++ b/lms/djangoapps/certificates/management/commands/gen_cert_report.py @@ -16,7 +16,6 @@ class Command(BaseCommand): This command does not do anything other than report the current certificate status. - unavailable - A student is not eligible for a certificate. generating - A request has been made to generate a certificate, but it has not been generated yet. regenerating - A request has been made to regenerate a certificate, @@ -64,11 +63,7 @@ class Command(BaseCommand): enrolled_students = User.objects.filter( courseenrollment__course_id=course_id).prefetch_related( "groups").order_by('username') - unavailable_count = enrolled_students.count() - \ - GeneratedCertificate.objects.filter( - course_id__exact=course_id).count() cert_data[course_id] = {'enrolled': enrolled_students.count()} - cert_data[course_id].update({'unavailable': unavailable_count}) tallies = GeneratedCertificate.objects.filter( course_id__exact=course_id).values('status').annotate(