chore(lms): add error-call to renewal notification to allow compilation until i18nHamletFile works

This commit is contained in:
Steffen Jost 2022-04-25 12:57:24 +02:00
parent e0c429cd1e
commit 9fe564ee25
4 changed files with 10 additions and 4 deletions

View File

@ -145,6 +145,7 @@ import Handler.Participants
import Handler.StorageKey
import Handler.Error
import Handler.Upload
import Handler.Qualification
import Handler.LMS
-- This line actually creates our YesodDispatch instance. It is the second half

View File

@ -103,7 +103,7 @@ dispatchJobLmsDequeue _qid =
-- wenn bestanden: qualification verlängern & LmsIdent löschen
-- wenn durchgefallen: LmsIdent löschen
-- wenn Zeit abgelaufen: LmsIdent löschen
error "lms dequeue stub"
error "TODO: lms dequeue stub"
dispatchJobLmsResults :: QualificationId -> JobHandler UniWorX
dispatchJobLmsResults qid = JobHandlerAtomic act

View File

@ -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,6 +46,9 @@ dispatchNotificationQualificationRenewal nQualification jRecipient = userMailT j
replaceMailHeader "Auto-Submitted" $ Just "auto-generated"
setSubjectI $ MsgMailSubjectQualificationRenewal qname
-- editNotifications <- mkEditNotifications jRecipient -- TODO: add to hamlet file again
addHtmlMarkdownAlternatives $(i18nHamletFile "qualification/renewal")
_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")

View File

@ -49,7 +49,9 @@ deriving newtype instance FromJSONKey UserId
deriving newtype instance ToJSONKey ExamOccurrenceId
deriving newtype instance FromJSONKey ExamOccurrenceId
-- required Show instances for use of getByJust
deriving instance Show (Unique ExamPart)
deriving instance Show (Unique QualificationUser)
-- ToMarkup and ToMessage instances for displaying selected database primary keys