fradrive/templates/widgets/gradingSummary.hamlet

35 lines
1.6 KiB
Plaintext

$# Displays gradings Summary for various purposes
$# --
$with SheetTypeSummary{..} <- addBonusToPoints gradingSummary
$with sumSummaries <- mappend normalSummary (mappend bonusSummary informationalSummary)
$with hasPassings <- positiveSum $ numGradePasses sumSummaries
$with hasPoints <- positiveSum $ sumGradePoints sumSummaries
<div>
<table>
<tr>
<th>
$# empty cell for row headers
$maybe _ <- hasPassings
<th colspan=2>_{MsgSheetGradingPassing'}
$maybe _ <- hasPoints
<th colspan=2>_{MsgSheetGradingPoints'}
<th>_{MsgSheetGradingCount'}
$# Number of Sheet/Submissions used for calculating maximum passes/points
$with sumHeader <- MsgSheetTypeNormal'
$with summary <- normalSummary
^{gradingSummaryRow}
$# $for (sumHeader, summary) <- [(MsgSheetTypeNormal',normalSummary),(MsgSheetTypeBonus',bonusSummary),(MsgSheetTypeInformational',informationalSummary)]
$# ^{gradingSummaryRow}
DEBUG
$maybe nrNoGrade <- positiveSum $ numNotGraded
<tr>
<th>_{MsgSheetTypeNotGraded}
$maybe _ <- hasPassings
<td colspan=2>
$maybe _ <- hasPoints
<td colspan=2>
<td>#{display nrNoGrade}
$maybe _ <- positiveSum $ bonusSummary ^. _numSheets
<p>_{MsgSheetTypeInfo}
$nothing
<p>_{MsgSheetTypeInfo}