diff --git a/src/Handler/LMS.hs b/src/Handler/LMS.hs index 5bb30b4b6..c4a9d91ef 100644 --- a/src/Handler/LMS.hs +++ b/src/Handler/LMS.hs @@ -149,6 +149,20 @@ mkLmsAllTable = do ] dbtStyle = def { dbsFilterLayout = defaultDBSFilterLayout } dbtParams = def + {- = DBParamsForm + { dbParamsFormMethod = POST + , dbParamsFormAction = Just $ SomeRoute currentRoute + , dbParamsFormAttrs = [] + , dbParamsFormSubmit = FormSubmit + , dbParamsFormAdditional + = renderAForm FormStandard + $ (, mempty) . First . Just + <$> multiActionA acts (fslI MsgTableAction) Nothing + , dbParamsFormEvaluate = liftHandler . runFormPost + , dbParamsFormResult = id + , dbParamsFormIdent = def + } + -} dbtIdent :: Text dbtIdent = "qualification-overview" dbtCsvEncode = noCsvEncode diff --git a/src/Handler/LMS/Result.hs b/src/Handler/LMS/Result.hs index 6a6fdd7a4..05d5f1ee5 100644 --- a/src/Handler/LMS/Result.hs +++ b/src/Handler/LMS/Result.hs @@ -257,7 +257,7 @@ postLmsResultUploadR sid qsh = do |] -postLmsResultDirectR :: SchoolId -> QualificationShorthand -> Handler Html +postLmsResultDirectR :: SchoolId -> QualificationShorthand -> Handler Text postLmsResultDirectR sid qsh = do (_params, files) <- runRequestBody case files of @@ -269,7 +269,12 @@ postLmsResultDirectR sid qsh = do .| foldMC (saveResultCsv qid) 0 queueDBJob $ JobLmsResults qid return nr - addMessage Success $ toHtml $ pack "Erfolgreicher Upload der Datei " <> fileName file <> pack (" mit " <> show nr <> " Zeilen für Result mit Header ") <> fhead - [] -> addMessage Error "Es wurde keine Datei übermittelt." - _other -> addMessage Error "Es darf nur genau eine Datei übermittelt werden." - redirect $ LmsResultR sid qsh + --addMessage Success $ toHtml $ pack "Erfolgreicher Upload der Datei " <> fileName file <> pack (" mit " <> show nr <> " Zeilen für Result mit Header ") <> fhead + sendResponseStatus ok200 ("Success."::Text) + [] -> --do + --addMessage Error "Es wurde keine Datei übermittelt." + sendResponseStatus badRequest400 ("No files received."::Text) + _other -> --do + --addMessage Error "Es darf nur genau eine Datei übermittelt werden." + sendResponseStatus badRequest400 ("Too many files received."::Text) + diff --git a/src/Jobs/Handler/SendNotification/Qualification.hs b/src/Jobs/Handler/SendNotification/Qualification.hs index 124dfb676..3d4a46639 100644 --- a/src/Jobs/Handler/SendNotification/Qualification.hs +++ b/src/Jobs/Handler/SendNotification/Qualification.hs @@ -46,7 +46,7 @@ dispatchNotificationQualificationRenewal nQualification jRecipient = do <*> getJust nQualification <*> getJustBy (UniqueQualificationUser nQualification jRecipient) let qname = CI.original qualificationName - _content = $(i18nWidgetFile "qualification/renewal") + -- content = $(i18nWidgetFile "qualification/renewal") if | checkEmailOk userEmail -> userMailT jRecipient $ do replaceMailHeader "Auto-Submitted" $ Just "auto-generated" diff --git a/templates/mail/qualificationRenewal.hamlet b/templates/mail/qualificationRenewal.hamlet index f847078e4..527cc7d1c 100644 --- a/templates/mail/qualificationRenewal.hamlet +++ b/templates/mail/qualificationRenewal.hamlet @@ -34,4 +34,9 @@ $newline never Zuerst erhalten: #{show qualificationUserFirstHeld} +

+

+ Test + content + ^{ihamletSomeMessage editNotifications}