diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 141fc2798a..78ade4152c 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -149,7 +149,7 @@ def dashboard(request): # TODO: workaround to not have to zip courses and certificates in the template # since before there is a migration to certificates if settings.MITX_FEATURES.get('CERTIFICATES_ENABLED'): - cert_statuses = {(course.id, certificate_status_for_student(request.user, course.id)) for course in courses} + cert_statuses = { course.id: certificate_status_for_student(request.user, course.id) for course in courses} else: cert_statuses = {} diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index edd882afd0..0ccdfc0d37 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -157,7 +157,7 @@ <% cert_status = cert_statuses.get(course.id) %> - % if course.has_ended and cert_status: + % if course.has_ended() and cert_status: <% passing_grade = False cert_button = False