correctorForm just a stub
This commit is contained in:
parent
26c5ba5183
commit
38e438b774
@ -97,7 +97,7 @@ data MenuItem = MenuItem
|
|||||||
{ menuItemLabel :: Text
|
{ menuItemLabel :: Text
|
||||||
, menuItemIcon :: Maybe Text
|
, menuItemIcon :: Maybe Text
|
||||||
, menuItemRoute :: Route UniWorX
|
, menuItemRoute :: Route UniWorX
|
||||||
, menuItemAccessCallback' :: Handler Bool
|
, menuItemAccessCallback' :: Handler Bool -- Check whether action is shown in ADDITION to authorization (which is always checked)
|
||||||
}
|
}
|
||||||
|
|
||||||
menuItemAccessCallback :: MenuItem -> Handler Bool
|
menuItemAccessCallback :: MenuItem -> Handler Bool
|
||||||
@ -426,6 +426,12 @@ pageActions (CourseR tid csh CourseShowR) =
|
|||||||
, menuItemRoute = CSheetR tid csh SheetListR
|
, menuItemRoute = CSheetR tid csh SheetListR
|
||||||
, menuItemAccessCallback' = return True
|
, menuItemAccessCallback' = return True
|
||||||
}
|
}
|
||||||
|
, PageActionPrime $ MenuItem
|
||||||
|
{ menuItemLabel = "Kurs Editieren"
|
||||||
|
, menuItemIcon = Nothing
|
||||||
|
, menuItemRoute = CourseR tid csh CourseEditR
|
||||||
|
, menuItemAccessCallback' = return True
|
||||||
|
}
|
||||||
]
|
]
|
||||||
pageActions (CSheetR tid csh SheetListR) =
|
pageActions (CSheetR tid csh SheetListR) =
|
||||||
[ PageActionPrime $ MenuItem
|
[ PageActionPrime $ MenuItem
|
||||||
|
|||||||
@ -62,6 +62,7 @@ data SheetForm = SheetForm
|
|||||||
, sfSolutionFrom :: Maybe UTCTime
|
, sfSolutionFrom :: Maybe UTCTime
|
||||||
, sfSolutionF :: Maybe FileInfo
|
, sfSolutionF :: Maybe FileInfo
|
||||||
-- Keine SheetId im Formular!
|
-- Keine SheetId im Formular!
|
||||||
|
, sfCorrectors :: [(UserId,Load)]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -89,7 +90,8 @@ makeSheetForm msId template = identForm FIDsheet $ \html -> do
|
|||||||
<*> fileAFormOpt (fsb "Hinweis")
|
<*> fileAFormOpt (fsb "Hinweis")
|
||||||
<*> aopt utcTimeField (fsb "Lösung ab") (sfSolutionFrom <$> template)
|
<*> aopt utcTimeField (fsb "Lösung ab") (sfSolutionFrom <$> template)
|
||||||
<*> fileAFormOpt (fsb "Lösung")
|
<*> fileAFormOpt (fsb "Lösung")
|
||||||
<* submitButton
|
<*> formToAForm (correctorForm msId (maybe [] sfCorrectors template))
|
||||||
|
-- <* submitButton
|
||||||
return $ case result of
|
return $ case result of
|
||||||
FormSuccess sheetResult
|
FormSuccess sheetResult
|
||||||
| errorMsgs <- validateSheet sheetResult
|
| errorMsgs <- validateSheet sheetResult
|
||||||
@ -118,7 +120,14 @@ makeSheetForm msId template = identForm FIDsheet $ \html -> do
|
|||||||
-- TODO: continue validation here!!!
|
-- TODO: continue validation here!!!
|
||||||
] ]
|
] ]
|
||||||
|
|
||||||
|
correctorForm :: Maybe SheetId -> [(UserId,Load)] -> MForm Handler (FormResult [(UserId,Load)], [FieldView UniWorX])
|
||||||
|
correctorForm _msid templates = do undefined
|
||||||
|
-- Datenbank UserId -> UserName
|
||||||
|
-- Eingabelist für Colonnade
|
||||||
|
-- enthält die benötigten Felder
|
||||||
|
-- FormResult konstruieren
|
||||||
|
-- Eingabebox für Korrektor hinzufügen
|
||||||
|
-- Eingabe für Korrekt ausgefüllt: FormMissing zurückschicken um dann Feld hinzuzufügen
|
||||||
|
|
||||||
|
|
||||||
-- List Sheets
|
-- List Sheets
|
||||||
@ -289,6 +298,7 @@ getSheetEditR tid csh shn = do
|
|||||||
, sfHintF = Nothing -- TODO
|
, sfHintF = Nothing -- TODO
|
||||||
, sfSolutionFrom = sheetSolutionFrom
|
, sfSolutionFrom = sheetSolutionFrom
|
||||||
, sfSolutionF = Nothing -- TODO
|
, sfSolutionF = Nothing -- TODO
|
||||||
|
, sfCorrectors = [] -- TODO read correctors from list
|
||||||
}
|
}
|
||||||
let action newSheet = do
|
let action newSheet = do
|
||||||
replaceRes <- myReplaceUnique sid $ newSheet
|
replaceRes <- myReplaceUnique sid $ newSheet
|
||||||
|
|||||||
Reference in New Issue
Block a user