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
ssh = course ^. _4
-- shn = sheetName
mkRoute = do
cid <- encrypt subId
return $ CSubmissionR tid ssh csh sheetName cid CorrectionR
@ -435,7 +436,6 @@ postCorrectionsR = do
, colAssigned
, colRating
, colRated
, colSheetType
] -- Continue here
psValidator = def
& 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
, colSubmittors
, colSubmissionLink
, colSheetType
, colRating
, colRated
, colCorrector
@ -771,7 +770,6 @@ postCorrectionsGradeR = do
, colSheet
, colPseudonyms
, colSubmissionLink
, colSheetType
, colRated
, colRatedField
, colPointsField

View File

@ -335,17 +335,17 @@ sheetGradingAFormReq :: FieldSettings UniWorX -> Maybe SheetGrading -> AForm Han
sheetGradingAFormReq fs template = multiActionA fs selOptions (classify' <$> template)
where
selOptions = Map.fromList
[ ( Points', Points <$> maxPointsReq )
[ ( Points', Points <$> maxPointsReq )
, ( PassPoints', PassPoints <$> maxPointsReq <*> passPointsReq )
, ( PassBinary', pure PassBinary)
]
classify' :: SheetGrading -> SheetGrading'
classify' = \case
Points {} -> Points'
Points {} -> Points'
PassPoints {} -> PassPoints'
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)

View File

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