From 5f5f56bbbdab9dd312f6ad40d95255717670f9a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s=20Rocha?= Date: Fri, 9 Nov 2012 21:40:55 -0500 Subject: [PATCH] Fix syntax on dashboard template --- common/djangoapps/student/views.py | 2 +- lms/templates/dashboard.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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