MB-1192: [feat] Add course ended, not passing certificate status to dashboard messaging (#28405)

* [feat] Add course over, not passing status to dash

If a student has not passed a course, the course has ended, and they
have a verified seat, we want to show them a message at a glance on the
dashboard.
This commit is contained in:
Thomas Tracy
2021-08-09 10:03:49 -04:00
committed by GitHub
parent 14a369bd7b
commit 35d9330c19
7 changed files with 63 additions and 11 deletions

View File

@@ -340,6 +340,12 @@ class OutlineTabView(RetrieveAPIView):
if user_grade:
user_has_passing_grade = user_grade.passed
user_has_passing_grade = False
if not request.user.is_anonymous:
user_grade = CourseGradeFactory().read(request.user, course)
if user_grade:
user_has_passing_grade = user_grade.passed
data = {
'access_expiration': access_expiration,
'cert_data': cert_data,