parent
970ca784b0
commit
14f9ab6a31
@ -1132,10 +1132,7 @@ postCorrectionsGradeR = do
|
|||||||
{ dbParamsFormAction = Just $ SomeRoute CorrectionsGradeR
|
{ dbParamsFormAction = Just $ SomeRoute CorrectionsGradeR
|
||||||
}
|
}
|
||||||
|
|
||||||
case tableRes of
|
formResult tableRes $ \resMap -> do
|
||||||
FormMissing -> return ()
|
|
||||||
FormFailure errs -> forM_ errs $ addMessage Error . toHtml
|
|
||||||
FormSuccess resMap -> do
|
|
||||||
now <- liftIO getCurrentTime
|
now <- liftIO getCurrentTime
|
||||||
subs <- fmap catMaybes . runDB . forM (Map.toList resMap) $ \(subId, (rated, mPoints, mComment)) -> do
|
subs <- fmap catMaybes . runDB . forM (Map.toList resMap) $ \(subId, (rated, mPoints, mComment)) -> do
|
||||||
s@Submission{..} <- get404 subId
|
s@Submission{..} <- get404 subId
|
||||||
@ -1152,6 +1149,7 @@ postCorrectionsGradeR = do
|
|||||||
let trigger = [whamlet|_{MsgCorrectionsUploaded (genericLength subs')}|]
|
let trigger = [whamlet|_{MsgCorrectionsUploaded (genericLength subs')}|]
|
||||||
content = Right $(widgetFile "messages/correctionsUploaded")
|
content = Right $(widgetFile "messages/correctionsUploaded")
|
||||||
unless (null subs') $ addMessageModal Success trigger content
|
unless (null subs') $ addMessageModal Success trigger content
|
||||||
|
redirect CorrectionsGradeR
|
||||||
|
|
||||||
siteLayoutMsg MsgCorrectionsGrade $ do
|
siteLayoutMsg MsgCorrectionsGrade $ do
|
||||||
setTitleI MsgCorrectionsGrade
|
setTitleI MsgCorrectionsGrade
|
||||||
|
|||||||
Reference in New Issue
Block a user