Proper statistics implemented for submission lists
This commit is contained in:
parent
81d8d8c017
commit
42915b3920
@ -389,7 +389,8 @@ SheetTypeBonus grading@SheetGrading: Bonus
|
||||
SheetTypeNormal grading@SheetGrading: Normal
|
||||
SheetTypeInformational grading@SheetGrading: Keine Wertung
|
||||
SheetTypeNotGraded: Unbewertet
|
||||
SheetTypeInfo: Bonus Blätter zählen, erhöhen aber nicht die maximal erreichbare Punktzahl bzw. Anzahl zu bestehender Blätter. Blätter ohne Wertung werden nirgends angerechnet, die Bewertung durch den Korrektor dient lediglich zur Information an die Teilnehmer.
|
||||
SheetTypeInfo: Bonus Blätter zählen normal, erhöhen aber nicht die maximal erreichbare Punktzahl bzw. Anzahl zu bestehender Blätter. Blätter ohne Wertung werden nirgends angerechnet, die Bewertung durch den Korrektor dient lediglich zur Information an die Teilnehmer.
|
||||
SheetGradingBonusIncluded: Erzielte Bonuspunkte wurden hier bereits zu den normalen Punkten hinzugezählt.
|
||||
|
||||
SheetTypeBonus': Bonus
|
||||
SheetTypeNormal': Normal
|
||||
|
||||
@ -383,10 +383,10 @@ correctionsR whereClause (formColonnade -> displayColumns) psValidator actions =
|
||||
let route = CSubmissionR tid ssh csh shn cID SAssignR
|
||||
(== Authorized) <$> evalAccessDB route True
|
||||
|
||||
gradeSummaryWidget :: SheetTypeSummary -> Widget UniWorX IO ()
|
||||
gradeSummaryWidget :: SheetTypeSummary -> Widget
|
||||
gradeSummaryWidget sts =
|
||||
let SheetTypeSummary{..} = addBonusToPoints sts
|
||||
sumSummaries = (normalSummary <> bonusSummary <> informationalSummary) # _numSheets %~ (<> numNotGraded)
|
||||
sumSummaries = (normalSummary <> bonusSummary <> informationalSummary) -- # _numSheets %~ (<> numNotGraded)
|
||||
hasPassings = positiveSum $ numGradePasses sumSummaries
|
||||
hasPoints = positiveSum $ sumGradePoints sumSummaries
|
||||
rowWdgts = [ $(widgetFile "widgets/gradingSummaryRow")
|
||||
@ -395,7 +395,9 @@ gradeSummaryWidget sts =
|
||||
, (MsgSheetTypeBonus' ,bonusSummary)
|
||||
, (MsgSheetTypeInformational' ,informationalSummary)
|
||||
] ]
|
||||
in $(widgetFile "widgets/gradingSummary")
|
||||
in if 0 == numSheets sumSummaries
|
||||
then mempty
|
||||
else $(widgetFile "widgets/gradingSummary")
|
||||
|
||||
|
||||
type ActionCorrections' = (ActionCorrections, AForm (HandlerT UniWorX IO) ActionCorrectionsData)
|
||||
|
||||
@ -1,27 +1,29 @@
|
||||
$# Displays gradings Summary for various purposes
|
||||
$# --
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<table .table .table--striped>
|
||||
<tr .table__row .table__row--head>
|
||||
<th>
|
||||
$# empty cell for row headers
|
||||
$maybe _ <- hasPassings
|
||||
<th colspan=2>_{MsgSheetGradingPassing'}
|
||||
<th .table__th colspan=2>_{MsgSheetGradingPassing'}
|
||||
$maybe _ <- hasPoints
|
||||
<th colspan=2>_{MsgSheetGradingPoints'}
|
||||
<th>_{MsgSheetGradingCount'}
|
||||
<th .table__th colspan=2>_{MsgSheetGradingPoints'}
|
||||
<th .table__th>_{MsgSheetGradingCount'}
|
||||
$# Number of Sheet/Submissions used for calculating maximum passes/points
|
||||
$forall row <- rowWdgts
|
||||
^{row}
|
||||
$maybe nrNoGrade <- positiveSum $ numNotGraded
|
||||
<tr>
|
||||
<th>_{MsgSheetTypeNotGraded}
|
||||
<tr .table__row>
|
||||
<th .table__th>_{MsgSheetTypeNotGraded}
|
||||
$maybe _ <- hasPassings
|
||||
<td colspan=2>
|
||||
$maybe _ <- hasPoints
|
||||
<td colspan=2>
|
||||
<td>#{display nrNoGrade}
|
||||
<td .table__td colspan=2>
|
||||
<td .table__td>#{display nrNoGrade}
|
||||
$maybe _ <- positiveSum $ bonusSummary ^. _numSheets
|
||||
<p>_{MsgSheetTypeInfo}
|
||||
<p>_{MsgSheetGradingBonusIncluded}
|
||||
$nothing
|
||||
<p>_{MsgSheetTypeInfo}
|
||||
$maybe _ <- positiveSum $ informationalSummary ^. _numSheets
|
||||
<p>_{MsgSheetTypeInfo}
|
||||
@ -6,28 +6,28 @@ $# summary :: SheetGradeSummary -- summary to display
|
||||
$# sumHeader :: UniWorXMessage -- row header
|
||||
$#
|
||||
$maybe nrSheets <- positiveSum $ summary ^. _numSheets
|
||||
<tr>
|
||||
<th>_{sumHeader}
|
||||
<tr .table__row >
|
||||
<th .table__th>_{sumHeader}
|
||||
$maybe _ <- hasPassings
|
||||
$with Sum pmax <- sumHeader ^. _numGradePasses
|
||||
$with Sum pmax <- summary ^. _numGradePasses
|
||||
$maybe Sum pacv <- summary ^. _achievedPasses
|
||||
<td>
|
||||
<td .table__td>
|
||||
$if pmax /= 0
|
||||
#{textPercentInt pacv pmax}
|
||||
<td>
|
||||
<td .table__td>
|
||||
#{display pacv} / #{display pmax}
|
||||
$nothing
|
||||
<td colspan=2>
|
||||
<td .table__td colspan=2>
|
||||
#{display pmax }
|
||||
$maybe _ <- hasPoints
|
||||
$with Sum pmax <- sumHeader ^. _sumGradePoints
|
||||
$with Sum pmax <- summary ^. _sumGradePoints
|
||||
$maybe Sum pacv <- summary ^. _achievedPoints
|
||||
<td>
|
||||
<td .table__td>
|
||||
$if pmax /= 0
|
||||
#{textPercent $ realToFrac $ pacv / pmax}
|
||||
<td>
|
||||
<td .table__td>
|
||||
#{display pacv} / #{display pmax}
|
||||
$nothing
|
||||
<td colspan=2>
|
||||
<td .table__td colspan=2>
|
||||
#{display pmax }
|
||||
<td>#{display nrSheets}
|
||||
<td .table__td>#{display nrSheets}
|
||||
Loading…
Reference in New Issue
Block a user