LEARNER-925 - Allow user to get program certificate if enrolled as verified in credit course

This commit is contained in:
ayub-khan
2017-06-01 15:31:48 +05:00
parent 3b39aa49e0
commit 761db165b5
2 changed files with 23 additions and 1 deletions

View File

@@ -266,7 +266,12 @@ class ProgramProgressMeter(object):
# count towards completion of a course in a program). This may change
# in the future to make use of the more rigid set of "applicable seat
# types" associated with each program type in the catalog.
'type': course_run['type'],
# Runs of type 'credit' are counted as 'verified' since verified
# certificates are earned when credit runs are completed. LEARNER-1274
# tracks a cleaner way to do this using the discovery service's
# applicable_seat_types field.
'type': 'verified' if course_run['type'] == 'credit' else course_run['type'],
}
return any(reshape(course_run) in self.completed_course_runs for course_run in course['course_runs'])