diff --git a/messages/uniworx/categories/qualification/de-de-formal.msg b/messages/uniworx/categories/qualification/de-de-formal.msg index 10435f453..9d09d0b63 100644 --- a/messages/uniworx/categories/qualification/de-de-formal.msg +++ b/messages/uniworx/categories/qualification/de-de-formal.msg @@ -44,3 +44,4 @@ LmsDirectUpload: Direkter Upload für automatisierte Systeme LmsErrorNoRefreshElearning: Fehler: E-Lernen wird nicht automatisch gestartet, da die Zeitspanne für den Erneurerungszeitraum nicht festgelegt wurde. MailSubjectQualificationRenewal qname@Text: Ihre Qualifikation #{qname} muss demnächst erneuert werden MailSubjectQualificationExpiry qname@Text: Ihre Qualifikation #{qname} läuft demnächst ab +MailLmsRenewalBody: Sie müssen diese Qualifikaton demnächst durch einen E-Learning Kurs erneuern. diff --git a/messages/uniworx/categories/qualification/en-eu.msg b/messages/uniworx/categories/qualification/en-eu.msg index ae3556311..c8054d175 100644 --- a/messages/uniworx/categories/qualification/en-eu.msg +++ b/messages/uniworx/categories/qualification/en-eu.msg @@ -44,3 +44,4 @@ LmsDirectUpload: Direct upload for automated Systems LmsErrorNoRefreshElearning: Error: E-learning will not be started automatically due to refresh-within time period not being set. MailSubjectQualificationRenewal qname@Text: Your qualification #{qname} must be renewed shortly MailSubjectQualificationExpiry qname@Text: Your qualification #{qname} expires soon +MailLmsRenewalBody: You will soon need to renew this qualficiation by completing an e-learning course. \ No newline at end of file diff --git a/src/Handler/Utils/Table/Pagination.hs b/src/Handler/Utils/Table/Pagination.hs index 80f1fa0fe..341188d9b 100644 --- a/src/Handler/Utils/Table/Pagination.hs +++ b/src/Handler/Utils/Table/Pagination.hs @@ -1066,9 +1066,7 @@ dbTable PSValidator{..} dbtable@DBTable{ dbtIdent = dbtIdent'@(toPathPiece -> db <|> piInput psShortcircuit <- (== Just dbtIdent') <$> lookupCustomHeader HeaderDBTableShortcircuit - lch <- lookupCustomHeader HeaderDBTableShortcircuit - $logErrorS "DBShortcircuit" $ fromMaybe mempty lch <> " and also " <> tshow psShortcircuit - + let -- adjustPI = over _piSorting $ guardOnM doSorting -- probably not neccessary; not displaying the links should be enough for now ((errs, PaginationSettings{..}), paginationInput@PaginationInput{..}) diff --git a/src/Jobs/Handler/SendNotification/Qualification.hs b/src/Jobs/Handler/SendNotification/Qualification.hs index dfe145c8d..8891f4c69 100644 --- a/src/Jobs/Handler/SendNotification/Qualification.hs +++ b/src/Jobs/Handler/SendNotification/Qualification.hs @@ -37,7 +37,7 @@ dispatchNotificationQualificationExpiry nQualification _nExpiry jRecipient = use dispatchNotificationQualificationRenewal :: QualificationId -> UserId -> Handler () dispatchNotificationQualificationRenewal nQualification jRecipient = userMailT jRecipient $ do - (User{}, Qualification{..}, Entity _ QualificationUser{}) <- liftHandler . runDB $ (,,) + (User{..}, Qualification{..}, Entity _ QualificationUser{..}) <- liftHandler . runDB $ (,,) <$> getJust jRecipient <*> getJust nQualification <*> getJustBy (UniqueQualificationUser nQualification jRecipient) @@ -46,9 +46,8 @@ dispatchNotificationQualificationRenewal nQualification jRecipient = userMailT j replaceMailHeader "Auto-Submitted" $ Just "auto-generated" setSubjectI $ MsgMailSubjectQualificationRenewal qname - _editNotifications <- mkEditNotifications jRecipient -- TODO: add to hamlet file again + editNotifications <- mkEditNotifications jRecipient -- TODO: add to hamlet file again --addHtmlMarkdownAlternatives $(i18nHamletFile "qualification/renewal") -- TODO: this is just a dummy to continue while i18nHamletFile usage is unclear - error "TODO: QualificationRenewal notification no yet implemented" - -- addHtmlMarkdownAlternatives $(ihamletFile "templates/mail/qualificationExpiry.hamlet") + addHtmlMarkdownAlternatives $(ihamletFile "templates/mail/qualificationRenewal.hamlet") \ No newline at end of file diff --git a/templates/mail/qualificationRenewal.hamlet b/templates/mail/qualificationRenewal.hamlet new file mode 100644 index 000000000..f847078e4 --- /dev/null +++ b/templates/mail/qualificationRenewal.hamlet @@ -0,0 +1,37 @@ +$newline never +\ + + + +