Rating type shown along rating in all corrections.

This commit is contained in:
SJost 2018-11-30 21:51:16 +01:00
parent 2ef4bbc014
commit b05f1ccc75
3 changed files with 28 additions and 29 deletions

View File

@ -150,6 +150,7 @@ colRating = sortable (Just "rating") (i18nCell MsgRating) $ \DBRow{ dbrOutput=(
tid = course ^. _3 tid = course ^. _3
ssh = course ^. _4 ssh = course ^. _4
-- shn = sheetName -- shn = sheetName
mkRoute = do mkRoute = do
cid <- encrypt subId cid <- encrypt subId
return $ CSubmissionR tid ssh csh sheetName cid CorrectionR return $ CSubmissionR tid ssh csh sheetName cid CorrectionR
@ -435,7 +436,6 @@ postCorrectionsR = do
, colAssigned , colAssigned
, colRating , colRating
, colRated , colRated
, colSheetType
] -- Continue here ] -- Continue here
psValidator = def psValidator = def
& restrictFilter (\name _ -> name /= "corrector") -- We need to be careful to restrict allowed sorting/filter to not expose sensitive information & restrictFilter (\name _ -> name /= "corrector") -- We need to be careful to restrict allowed sorting/filter to not expose sensitive information
@ -456,7 +456,6 @@ postCCorrectionsR tid ssh csh = do
, colSMatrikel , colSMatrikel
, colSubmittors , colSubmittors
, colSubmissionLink , colSubmissionLink
, colSheetType
, colRating , colRating
, colRated , colRated
, colCorrector , colCorrector
@ -771,7 +770,6 @@ postCorrectionsGradeR = do
, colSheet , colSheet
, colPseudonyms , colPseudonyms
, colSubmissionLink , colSubmissionLink
, colSheetType
, colRated , colRated
, colRatedField , colRatedField
, colPointsField , colPointsField

View File

@ -335,17 +335,17 @@ sheetGradingAFormReq :: FieldSettings UniWorX -> Maybe SheetGrading -> AForm Han
sheetGradingAFormReq fs template = multiActionA fs selOptions (classify' <$> template) sheetGradingAFormReq fs template = multiActionA fs selOptions (classify' <$> template)
where where
selOptions = Map.fromList selOptions = Map.fromList
[ ( Points', Points <$> maxPointsReq ) [ ( Points', Points <$> maxPointsReq )
, ( PassPoints', PassPoints <$> maxPointsReq <*> passPointsReq ) , ( PassPoints', PassPoints <$> maxPointsReq <*> passPointsReq )
, ( PassBinary', pure PassBinary) , ( PassBinary', pure PassBinary)
] ]
classify' :: SheetGrading -> SheetGrading' classify' :: SheetGrading -> SheetGrading'
classify' = \case classify' = \case
Points {} -> Points' Points {} -> Points'
PassPoints {} -> PassPoints' PassPoints {} -> PassPoints'
PassBinary {} -> PassBinary' PassBinary {} -> PassBinary'
maxPointsReq = apreq pointsField (fslI MsgSheetGradingMaxPoints) (template >>= preview _maxPoints) maxPointsReq = apreq pointsField (fslI MsgSheetGradingMaxPoints) (template >>= preview _maxPoints)
passPointsReq = apreq pointsField (fslI MsgSheetGradingPassingPoints) (template >>= preview _passingPoints) passPointsReq = apreq pointsField (fslI MsgSheetGradingPassingPoints) (template >>= preview _passingPoints)

View File

@ -6,15 +6,16 @@ $maybe points <- submissionRatingPoints
$case grading $case grading
$of Points{..} $of Points{..}
_{MsgAchievedOf points maxPoints} _{MsgAchievedOf points maxPoints}
$of PassPoints{} $of PassPoints{maxPoints}
$if fromMaybe False (gradingPassed grading points) $if fromMaybe False (gradingPassed grading points)
_{MsgPassed} _{MsgPassed}, _{MsgAchievedOf points maxPoints}
$else $else
_{MsgNotPassed} _{MsgNotPassed}, _{MsgAchievedOf points maxPoints}
$of PassBinary $of PassBinary
$if fromMaybe False (gradingPassed grading points) $if fromMaybe False (gradingPassed grading points)
_{MsgPassed} _{MsgPassed}
$else $else
_{MsgNotPassed} _{MsgNotPassed}
, _{SheetTypeHeader sheetType}
$nothing $nothing
#{tickmarkS} #{tickmarkS}