$# Displays one row of the grading summary $# Expects several variables: $# hasPassing :: Maybe Int -- Should Passing be displayed? $# hasPoints :: Maybe Poibts -- Should Points be displayed? $# summary :: SheetGradeSummary -- summary to display $# sumHeader :: UniWorXMessage -- row header $# $maybe nrSheets <- positiveSum $ summary ^. _numSheets _{sumHeader} $maybe _ <- hasPassings $with Sum pmax <- summary ^. _numGradePasses $maybe Sum pacv <- summary ^. _achievedPasses $if pmax /= 0 #{textPercentInt pacv pmax} #{display pacv} / #{display pmax} $nothing #{display pmax } $maybe _ <- hasPoints $with Sum pmax <- summary ^. _sumGradePoints $maybe Sum pacv <- summary ^. _achievedPoints $if pmax /= 0 #{textPercent $ realToFrac $ pacv / pmax} #{display pacv} / #{display pmax} $nothing #{display pmax } #{display nrSheets}