MCPcopy Create free account
hub / github.com/codecombat/codecombat / formatStudentLicenseStatusDate

Function formatStudentLicenseStatusDate

app/core/utils.js:1238–1247  ·  view source on GitHub ↗
(status, date)

Source from the content-addressed store, hash-verified

1236const isValidEmail = email => emailRegex.test(email != null ? email.trim().toLowerCase() : undefined)
1237
1238const formatStudentLicenseStatusDate = function (status, date) {
1239 const string = (() => {
1240 switch (status) {
1241 case 'not-enrolled': return $.i18n.t('teacher.status_not_enrolled')
1242 case 'enrolled': if (date) { return $.i18n.t('teacher.status_enrolled') } else { return '-' }
1243 case 'expired': return $.i18n.t('teacher.status_expired')
1244 }
1245 })()
1246 return string.replace('{{date}}', date || 'Never')
1247}
1248
1249const formatStudentSingleLicenseStatusDate = function (product) {
1250 let string = $.i18n.t('teacher.full_license')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected