This commit is contained in:
Gregor Kleen 2018-11-03 21:53:45 +01:00
parent f6040c7eb2
commit b81b7bf58c
2 changed files with 10 additions and 6 deletions

View File

@ -187,10 +187,11 @@ getSheetListR tid ssh csh = do
$ \(Entity _ Sheet{sheetType=sType}, _, mbSub) -> case mbSub of $ \(Entity _ Sheet{sheetType=sType}, _, mbSub) -> case mbSub of
(Just (Entity _ Submission{submissionRatingPoints=Just sPoints})) -> (Just (Entity _ Submission{submissionRatingPoints=Just sPoints})) ->
case preview (_grading . _maxPoints) sType of case preview (_grading . _maxPoints) sType of
(Nothing) -> mempty Just maxPoints
(Just maxPoints) -> | maxPoints /= 0 ->
let percent = sPoints / maxPoints let percent = sPoints / maxPoints
in textCell $ textPercent $ realToFrac percent in textCell $ textPercent $ realToFrac percent
_other -> mempty
_other -> mempty _other -> mempty
] ]
psValidator = def psValidator = def

View File

@ -12,7 +12,9 @@ $with realGrades <- normalSummary <> bonusSummary
$maybe achievedBonus <- positiveSum (sumGradePoints bonusSummary) $maybe achievedBonus <- positiveSum (sumGradePoints bonusSummary)
von #{display achievedBonus} erreichbaren # von #{display achievedBonus} erreichbaren #
Bonuspunkten) Bonuspunkten)
\ #{textPercent $ realToFrac $ nPts / realPoints} $if realPoints /= 0
\ #{textPercent $ realToFrac $ nPts / realPoints}
\.
$maybe fakePoints <- positiveSum (sumGradePoints informationalSummary) $maybe fakePoints <- positiveSum (sumGradePoints informationalSummary)
<li> <li>
<em>Hinweis: <em>Hinweis:
@ -20,8 +22,9 @@ $with realGrades <- normalSummary <> bonusSummary
welche nicht gewertet wurden, sondern nur informativen Charakter besitzen welche nicht gewertet wurden, sondern nur informativen Charakter besitzen
$maybe achievedFakes <- getSum <$> achievedPoints informationalSummary $maybe achievedFakes <- getSum <$> achievedPoints informationalSummary
, davon wurden #{display achievedFakes} erreicht , davon wurden #{display achievedFakes} erreicht
\ #{textPercent $ realToFrac $ achievedFakes / fakePoints} $if fakePoints /= 0
. \ #{textPercent $ realToFrac $ achievedFakes / fakePoints}
\.
$maybe reqPasses <- positiveSum (numGradePasses normalSummary) $maybe reqPasses <- positiveSum (numGradePasses normalSummary)
<li> <li>
@ -30,7 +33,7 @@ $with realGrades <- normalSummary <> bonusSummary
\ davon #{display passed} bestanden \ davon #{display passed} bestanden
$maybe bonusPassed <- getSum <$> achievedPasses bonusSummary $maybe bonusPassed <- getSum <$> achievedPasses bonusSummary
\ (inklusive #{display bonusPassed} Bonusaufgaben) \ (inklusive #{display bonusPassed} Bonusaufgaben)
. \.
$maybe noGradeSheets <- positiveSum numNotGraded $maybe noGradeSheets <- positiveSum numNotGraded
<li> <li>