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 }
|
dbtStyle = def { dbsFilterLayout = defaultDBSFilterLayout }
|
||||||
dbtParams = def
|
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 :: Text
|
||||||
dbtIdent = "qualification-overview"
|
dbtIdent = "qualification-overview"
|
||||||
dbtCsvEncode = noCsvEncode
|
dbtCsvEncode = noCsvEncode
|
||||||
|
|||||||
@ -257,7 +257,7 @@ postLmsResultUploadR sid qsh = do
|
|||||||
|]
|
|]
|
||||||
|
|
||||||
|
|
||||||
postLmsResultDirectR :: SchoolId -> QualificationShorthand -> Handler Html
|
postLmsResultDirectR :: SchoolId -> QualificationShorthand -> Handler Text
|
||||||
postLmsResultDirectR sid qsh = do
|
postLmsResultDirectR sid qsh = do
|
||||||
(_params, files) <- runRequestBody
|
(_params, files) <- runRequestBody
|
||||||
case files of
|
case files of
|
||||||
@ -269,7 +269,12 @@ postLmsResultDirectR sid qsh = do
|
|||||||
.| foldMC (saveResultCsv qid) 0
|
.| foldMC (saveResultCsv qid) 0
|
||||||
queueDBJob $ JobLmsResults qid
|
queueDBJob $ JobLmsResults qid
|
||||||
return nr
|
return nr
|
||||||
addMessage Success $ toHtml $ pack "Erfolgreicher Upload der Datei " <> fileName file <> pack (" mit " <> show nr <> " Zeilen für Result mit Header ") <> fhead
|
--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."
|
sendResponseStatus ok200 ("Success."::Text)
|
||||||
_other -> addMessage Error "Es darf nur genau eine Datei übermittelt werden."
|
[] -> --do
|
||||||
redirect $ LmsResultR sid qsh
|
--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
|
<*> getJust nQualification
|
||||||
<*> getJustBy (UniqueQualificationUser nQualification jRecipient)
|
<*> getJustBy (UniqueQualificationUser nQualification jRecipient)
|
||||||
let qname = CI.original qualificationName
|
let qname = CI.original qualificationName
|
||||||
_content = $(i18nWidgetFile "qualification/renewal")
|
-- content = $(i18nWidgetFile "qualification/renewal")
|
||||||
if | checkEmailOk userEmail -> userMailT jRecipient $ do
|
if | checkEmailOk userEmail -> userMailT jRecipient $ do
|
||||||
|
|
||||||
replaceMailHeader "Auto-Submitted" $ Just "auto-generated"
|
replaceMailHeader "Auto-Submitted" $ Just "auto-generated"
|
||||||
|
|||||||
@ -34,4 +34,9 @@ $newline never
|
|||||||
Zuerst erhalten:
|
Zuerst erhalten:
|
||||||
#{show qualificationUserFirstHeld}
|
#{show qualificationUserFirstHeld}
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<h3>
|
||||||
|
Test
|
||||||
|
content
|
||||||
|
|
||||||
^{ihamletSomeMessage editNotifications}
|
^{ihamletSomeMessage editNotifications}
|
||||||
|
|||||||
Reference in New Issue
Block a user