feat(submissions): Apply suggestions to reduce lines of code
This commit is contained in:
parent
880eb3b1ad
commit
2f1ecd3979
@ -160,8 +160,7 @@ SubmissionDownloadGroups: Mit festen Abgabegruppen
|
|||||||
CorrAutoSetCorrector: Korrekturen verteilen
|
CorrAutoSetCorrector: Korrekturen verteilen
|
||||||
CorrDelete: Abgaben löschen
|
CorrDelete: Abgaben löschen
|
||||||
CorrSetCorrectionsDone: Korrekturen als abgeschlossen markieren
|
CorrSetCorrectionsDone: Korrekturen als abgeschlossen markieren
|
||||||
SetCorrectionsDoneTrue: Korrekturen als abgeschlossen markiert
|
SetCorrectionsDone b@Bool: Korrekturen als #{bool "nicht" "" b} abgeschlossen markiert
|
||||||
SetCorrectionsDoneFalse: Korrekturen als nicht abgeschlossen markiert
|
|
||||||
SubmissionCorrected: Korrigiert
|
SubmissionCorrected: Korrigiert
|
||||||
CorrectionSheets: Übersicht Korrekturen nach Blättern
|
CorrectionSheets: Übersicht Korrekturen nach Blättern
|
||||||
CorrectionCorrectors: Übersicht Korrekturen nach Korrektor:innen
|
CorrectionCorrectors: Übersicht Korrekturen nach Korrektor:innen
|
||||||
|
|||||||
@ -160,8 +160,7 @@ SubmissionDownloadGroups: With registered submission groups
|
|||||||
CorrAutoSetCorrector: Distribute corrections
|
CorrAutoSetCorrector: Distribute corrections
|
||||||
CorrDelete: Delete submissions
|
CorrDelete: Delete submissions
|
||||||
CorrSetCorrectionsDone: Set corrections as done
|
CorrSetCorrectionsDone: Set corrections as done
|
||||||
SetCorrectionsDoneTrue: Set corrections as done
|
SetCorrectionsDone b: Set corrections as #{bool "not" "" b} done
|
||||||
SetCorrectionsDoneFalse: Set corrections as not done
|
|
||||||
SubmissionCorrected: Marked
|
SubmissionCorrected: Marked
|
||||||
CorrectionSheets: Corrections by sheet
|
CorrectionSheets: Corrections by sheet
|
||||||
CorrectionCorrectors: Corrections by corrector
|
CorrectionCorrectors: Corrections by corrector
|
||||||
|
|||||||
@ -929,21 +929,13 @@ correctionsR' whereClause displayColumns dbtFilterUI csvSettings psValidator act
|
|||||||
unassigned' <- forM (Set.toList stillUnassigned) $ \sid -> encrypt sid :: DB CryptoFileNameSubmission
|
unassigned' <- forM (Set.toList stillUnassigned) $ \sid -> encrypt sid :: DB CryptoFileNameSubmission
|
||||||
addMessage Warning =<< withUrlRenderer ($(ihamletFile "templates/messages/submissionsNotAssignedAuto.hamlet") mr)
|
addMessage Warning =<< withUrlRenderer ($(ihamletFile "templates/messages/submissionsNotAssignedAuto.hamlet") mr)
|
||||||
redirect currentRoute
|
redirect currentRoute
|
||||||
(CorrSetCorrectionsDoneData True, subs') -> do
|
(CorrSetCorrectionsDoneData isDone, subs') -> do
|
||||||
subs <- mapM decrypt $ Set.toList subs'
|
|
||||||
now <- liftIO getCurrentTime
|
now <- liftIO getCurrentTime
|
||||||
runDB $ do
|
|
||||||
_ <- updateWhere [SubmissionId <-. subs]
|
|
||||||
[SubmissionRatingTime =. Just now]
|
|
||||||
addMessageI Success $ MsgSetCorrectionsDoneTrue
|
|
||||||
auditAllSubEdit subs
|
|
||||||
redirect currentRoute
|
|
||||||
(CorrSetCorrectionsDoneData False, subs') -> do
|
|
||||||
subs <- mapM decrypt $ Set.toList subs'
|
subs <- mapM decrypt $ Set.toList subs'
|
||||||
runDB $ do
|
runDB $ do
|
||||||
_ <- updateWhere [SubmissionId <-. subs]
|
_ <- updateWhere [SubmissionId <-. subs]
|
||||||
[SubmissionRatingTime =. Nothing]
|
[SubmissionRatingTime =. bool Nothing (Just now) isDone]
|
||||||
addMessageI Success $ MsgSetCorrectionsDoneFalse
|
addMessageI Success $ MsgSetCorrectionsDone isDone
|
||||||
auditAllSubEdit subs
|
auditAllSubEdit subs
|
||||||
redirect currentRoute
|
redirect currentRoute
|
||||||
(CorrDeleteData, subs) -> do
|
(CorrDeleteData, subs) -> do
|
||||||
|
|||||||
Reference in New Issue
Block a user