Merge branch 'master' of gitlab.cip.ifi.lmu.de:jost/UniWorX

This commit is contained in:
Gregor Kleen 2019-06-06 11:36:20 +02:00
commit 429708c4bf
3 changed files with 10 additions and 12 deletions

View File

@ -439,6 +439,8 @@ AccessibleSince: Verfügbar seit
Corrected: Korrigiert Corrected: Korrigiert
CorrectionAchievedPoints: Erzielte Punkte
CorrectionAchievedPass: Bestanden
FileCorrected: Korrigiert (Dateien) FileCorrected: Korrigiert (Dateien)
FileCorrectedDeleted: Korrigiert (gelöscht) FileCorrectedDeleted: Korrigiert (gelöscht)
RatingUpdated: Korrektur gespeichert RatingUpdated: Korrektur gespeichert

View File

@ -1062,17 +1062,13 @@ assignHandler tid ssh csh rawSids = do
-- process form -- process form
currentRoute <- getCurrentRoute currentRoute <- getCurrentRoute
((btnResult, btnWdgt), btnEnctype) <- runFormPost $ identifyForm FIDAssignSubmissions buttonForm ((btnResult, btnWdgt), btnEnctype) <- runFormPost $ identifyForm FIDAssignSubmissions buttonForm
assignmentStatus <- case btnResult of assignmentStatus <- fmap (fromMaybe Map.empty) . formResultMaybe btnResult $ \BtnSubmissionsAssign ->
FormSuccess BtnSubmissionsAssign -> do -- Button was pressed, assign and report -- Assign submissions
-- Assign submissions fmap Just . runDB $ (\f -> foldM f Map.empty sids) $
runDB $ (\f -> foldM f Map.empty sids) $ \acc sid -> flip (Map.insert sid) acc <$> assignSubmissions sid Nothing
\acc sid -> flip (Map.insert sid) acc <$> assignSubmissions sid Nothing -- Too much important information for an alert message. Display proper info page instead
-- Too much important information for an alert. Display proper info page instead
other -> do
formFailure2Alerts other -- show possible allerts
return Map.empty -- no assignments performed
let btnForm = wrapForm btnWdgt def let btnForm = wrapForm btnWdgt def
{ formAction = SomeRoute <$> currentRoute { formAction = SomeRoute <$> currentRoute -- TODO: should be a modal route
, formEncoding = btnEnctype , formEncoding = btnEnctype
, formSubmit = FormNoSubmit , formSubmit = FormNoSubmit
} }

View File

@ -15,11 +15,11 @@ $# --
<th> <th>
$# empty cell for row headers $# empty cell for row headers
$maybe _ <- hasMarkedPasses $maybe _ <- hasMarkedPasses
<th .table__th colspan=2>_{MsgCorrected} <th .table__th colspan=2>_{MsgCorrectionAchievedPass}
$maybe _ <- hasPasses $maybe _ <- hasPasses
<th .table__th>_{MsgSheetGradingPassing'} <th .table__th>_{MsgSheetGradingPassing'}
$maybe _ <- hasMarkedPoints $maybe _ <- hasMarkedPoints
<th .table__th colspan=2>_{MsgCorrected} <th .table__th colspan=2>_{MsgCorrectionAchievedPoints}
$maybe _ <- hasPoints $maybe _ <- hasPoints
<th .table__th>_{MsgSheetGradingPoints'} <th .table__th>_{MsgSheetGradingPoints'}
<th .table__th>_{MsgSheetGradingCount'} <th .table__th>_{MsgSheetGradingCount'}