File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
course-home/progress-tab/certificate-status
courseware/course/course-exit Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -91,11 +91,11 @@ const CertificateStatus = () => {
91
91
const dashboardLink = < DashboardLink /> ;
92
92
const idVerificationSupportLink = < IdVerificationSupportLink /> ;
93
93
const profileLink = < ProfileLink /> ;
94
-
95
94
// Some learners have a valid ("downloadable") certificate without being in a passing
96
95
// state (e.g. learners who have been added to a course's allowlist), so we need to
97
96
// skip grade validation for these learners
98
97
const certIsDownloadable = certStatus === 'downloadable' ;
98
+
99
99
if ( mode === COURSE_EXIT_MODES . disabled ) {
100
100
certEventName = 'certificate_status_disabled' ;
101
101
} else if ( mode === COURSE_EXIT_MODES . nonPassing && ! certIsDownloadable ) {
@@ -187,7 +187,8 @@ const CertificateStatus = () => {
187
187
// regardless of passing or nonpassing status
188
188
if ( ! canViewCertificate ) {
189
189
certCase = 'notAvailable' ;
190
- endDate = intl . formatDate ( end , {
190
+ // use the certificate_available_date if it is available, otherwise use the end date of the course
191
+ endDate = intl . formatDate ( ( certificateAvailableDate || end ) , {
191
192
year : 'numeric' ,
192
193
month : 'long' ,
193
194
day : 'numeric' ,
@@ -214,6 +215,7 @@ const CertificateStatus = () => {
214
215
} ) ;
215
216
// eslint-disable-next-line react-hooks/exhaustive-deps
216
217
} , [ ] ) ;
218
+
217
219
if ( ! certCase ) {
218
220
return null ;
219
221
}
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const CELEBRATION_STATUSES = [
17
17
'audit_passing' ,
18
18
'downloadable' ,
19
19
'earned_but_not_available' ,
20
+ 'not_earned_but_available_date' ,
20
21
'honor_passing' ,
21
22
'requesting' ,
22
23
'unverified' ,
You can’t perform that action at this time.
0 commit comments