From c5834eb6a21389976b1fe2d88418d8f4842c21a8 Mon Sep 17 00:00:00 2001 From: Joe Blaylock Date: Mon, 21 Apr 2014 10:12:49 -0700 Subject: [PATCH] Certs: pass course name on queue Stanford had a problem a few times that certificate requests had different values for the course display name and the course name printed on the certificate and verification pages because of human error. This passes the course display name on the queue to the certificate requests, so that at least one place where the course name is reproduced (the certificate agent's settings.py) can be eliminated. --- lms/djangoapps/certificates/queue.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lms/djangoapps/certificates/queue.py b/lms/djangoapps/certificates/queue.py index f593d58fb3..0a1f3ea63f 100644 --- a/lms/djangoapps/certificates/queue.py +++ b/lms/djangoapps/certificates/queue.py @@ -175,6 +175,7 @@ class XQueueCertInterface(object): self.request.user = student self.request.session = {} + course_name = course.display_name or course_id is_whitelisted = self.whitelist.filter(user=student, course_id=course_id, whitelist=True).exists() grade = grades.grade(student, self.request, course) enrollment_mode = CourseEnrollment.enrollment_mode_for_user(student, course_id) @@ -220,6 +221,7 @@ class XQueueCertInterface(object): 'action': 'create', 'username': student.username, 'course_id': course_id, + 'course_name': course_name, 'name': profile.name, 'grade': grade['grade'], 'template_pdf': template_pdf,