diff --git a/src/Handler/Utils/SheetType.hs b/src/Handler/Utils/SheetType.hs index 9e69815c9..de10d4d8b 100644 --- a/src/Handler/Utils/SheetType.hs +++ b/src/Handler/Utils/SheetType.hs @@ -25,12 +25,11 @@ gradeSummaryWidget title sts = hasMarkedPasses = positiveSum $ numMarkedPasses sumSummaries hasPoints = positiveSum $ numSheetsPoints sumSummaries hasMarkedPoints = positiveSum $ numMarkedPoints sumSummaries - rowWdgts = [ $(widgetFile "widgets/grading-summary/grading-summary-row") - | (sumHeader,summary) <- - [ (MsgSheetTypeNormal' ,normalSummary) - , (MsgSheetTypeBonus' ,bonusSummary) - , (MsgSheetTypeInformational' ,informationalSummary) - ] ] + rowWdgt sumHeader summary = $(widgetFile "widgets/grading-summary/grading-summary-row") -- diese Funktonsdefinition darf leider nicht im .hamlet stehen! + rowsShown = [ (MsgSheetTypeNormal' ,normalSummary) + , (MsgSheetTypeBonus' ,bonusSummary) + , (MsgSheetTypeInformational' ,informationalSummary) + ] -- diese Liste könnte auch im .hamlet definiert werden in if 0 == numSheets sumSummaries then mempty else $(widgetFile "widgets/grading-summary/grading-summary") diff --git a/templates/widgets/grading-summary/grading-summary.hamlet b/templates/widgets/grading-summary/grading-summary.hamlet index 248c4b085..a4d320491 100644 --- a/templates/widgets/grading-summary/grading-summary.hamlet +++ b/templates/widgets/grading-summary/grading-summary.hamlet @@ -24,8 +24,8 @@ $# -- _{MsgSheetGradingPoints'} _{MsgSheetGradingCount'} $# Number of Sheet/Submissions used for calculating maximum passes/points - $forall row <- rowWdgts - ^{row} + $forall (headMsg, summaryVal) <- rowsShown + ^{rowWdgt headMsg summaryVal} $maybe nrNoGrade <- positiveSum $ numNotGraded _{MsgSheetTypeNotGraded}