style(corrections-overview): better present tutorial assignments
This commit is contained in:
parent
3d3179d9fe
commit
c443ee4e0d
@ -316,11 +316,12 @@ derivePersistField "CorrectorState"
|
||||
showCompactCorrectorLoad :: Load -> CorrectorState -> Text
|
||||
showCompactCorrectorLoad load CorrectorMissing = "[" <> showCompactCorrectorLoad load CorrectorNormal <> "]"
|
||||
showCompactCorrectorLoad load CorrectorExcused = "{" <> showCompactCorrectorLoad load CorrectorNormal <> "}"
|
||||
showCompactCorrectorLoad Load{..} CorrectorNormal = proportionText <> tutorialText
|
||||
showCompactCorrectorLoad Load{..} CorrectorNormal | byProportion == 0 = tutorialText
|
||||
| otherwise = proportionText <> " + " <> tutorialText
|
||||
where
|
||||
proportionText = let propDbl :: Double
|
||||
propDbl = fromRational byProportion
|
||||
in tshow $ roundToDigits 2 propDbl
|
||||
tutorialText = case byTutorial of Nothing -> mempty
|
||||
Just True -> " (T)"
|
||||
Just False -> " +T "
|
||||
Just True -> "(T)"
|
||||
Just False -> "T"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user