chore(lms): remove redirect from direct handler
This commit is contained in:
parent
c8dc005830
commit
1ed47e677b
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -34,4 +34,9 @@ $newline never
|
||||
Zuerst erhalten:
|
||||
#{show qualificationUserFirstHeld}
|
||||
|
||||
<p>
|
||||
<h3>
|
||||
Test
|
||||
content
|
||||
|
||||
^{ihamletSomeMessage editNotifications}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user