Stubs for Lecture-User-Data
This commit is contained in:
parent
43598d05c4
commit
4d96504fe7
7
routes
7
routes
@ -59,6 +59,9 @@
|
|||||||
/ CShowR GET !free
|
/ CShowR GET !free
|
||||||
/register CRegisterR POST !timeANDcapacity
|
/register CRegisterR POST !timeANDcapacity
|
||||||
/edit CEditR GET POST
|
/edit CEditR GET POST
|
||||||
|
/users CUsersR GET
|
||||||
|
/user/#CryptoUUIDUser CUserR GET
|
||||||
|
/correctors CHiWisR GET
|
||||||
/subs CCorrectionsR GET POST
|
/subs CCorrectionsR GET POST
|
||||||
/ex SheetListR GET !registered !materials
|
/ex SheetListR GET !registered !materials
|
||||||
!/ex/new SheetNewR GET POST
|
!/ex/new SheetNewR GET POST
|
||||||
@ -77,10 +80,6 @@
|
|||||||
/correctors SCorrR GET POST
|
/correctors SCorrR GET POST
|
||||||
!/#SheetFileType/*FilePath SFileR GET !timeANDregistered !timeANDmaterials !corrector
|
!/#SheetFileType/*FilePath SFileR GET !timeANDregistered !timeANDmaterials !corrector
|
||||||
|
|
||||||
-- /user/#CryptoUUIDUser
|
|
||||||
-- /users
|
|
||||||
-- /correctors
|
|
||||||
|
|
||||||
|
|
||||||
/corrections CorrectionsR GET POST !corrector !lecturer
|
/corrections CorrectionsR GET POST !corrector !lecturer
|
||||||
/corrections/upload CorrectionsUploadR GET POST !corrector !lecturer
|
/corrections/upload CorrectionsUploadR GET POST !corrector !lecturer
|
||||||
|
|||||||
@ -66,6 +66,6 @@ getAdminUserR uuid = do
|
|||||||
defaultLayout $
|
defaultLayout $
|
||||||
[whamlet|
|
[whamlet|
|
||||||
<h1>TODO
|
<h1>TODO
|
||||||
<h2>Admin Page for User #{display userDisplayName}
|
<h2>Admin Page for User ^{nameWidget userDisplayName userSurname}
|
||||||
|]
|
|]
|
||||||
|
|
||||||
|
|||||||
@ -123,8 +123,13 @@ colSelect :: Colonnade _ CorrectionTableData (DBCell _ (FormResult (DBFormResult
|
|||||||
colSelect = dbSelect id $ \DBRow{ dbrOutput=(Entity subId _, _, _, _, _) } -> encrypt subId
|
colSelect = dbSelect id $ \DBRow{ dbrOutput=(Entity subId _, _, _, _, _) } -> encrypt subId
|
||||||
|
|
||||||
colSubmittors :: IsDBTable m a => Colonnade _ CorrectionTableData (DBCell m a)
|
colSubmittors :: IsDBTable m a => Colonnade _ CorrectionTableData (DBCell m a)
|
||||||
colSubmittors = sortable Nothing (i18nCell MsgSubmissionUsers) $ \DBRow{ dbrOutput=(_, _, _, _, users) } -> let
|
colSubmittors = sortable Nothing (i18nCell MsgSubmissionUsers) $ \DBRow{ dbrOutput=(_, _, course, _, users) } -> let
|
||||||
cell = listCell (Map.toList users) $ \(userId, User{..}) -> anchorCellM (AdminUserR <$> encrypt userId) (toWidget userDisplayName)
|
csh = course ^. _2
|
||||||
|
tid = course ^. _3
|
||||||
|
ssh = course ^. _4
|
||||||
|
link cid = CourseR tid ssh csh $ CUserR cid
|
||||||
|
cell = listCell (Map.toList users) $ \(userId, User{..}) -> do
|
||||||
|
anchorCellM (link <$> encrypt userId) (nameWidget userDisplayName userSurname)
|
||||||
in cell & cellAttrs <>~ [("class", "list--inline list--comma-separated")]
|
in cell & cellAttrs <>~ [("class", "list--inline list--comma-separated")]
|
||||||
|
|
||||||
colSMatrikel :: IsDBTable m a => Colonnade _ CorrectionTableData (DBCell m a)
|
colSMatrikel :: IsDBTable m a => Colonnade _ CorrectionTableData (DBCell m a)
|
||||||
@ -379,10 +384,11 @@ postSSubsR tid ssh csh shn = do
|
|||||||
colonnade = mconcat
|
colonnade = mconcat
|
||||||
[ colSelect
|
[ colSelect
|
||||||
, dbRow
|
, dbRow
|
||||||
, colCorrector
|
, colSMatrikel
|
||||||
, colSubmittors
|
, colSubmittors
|
||||||
, colSubmissionLink
|
, colSubmissionLink
|
||||||
, colRating
|
, colRating
|
||||||
|
, colCorrector
|
||||||
]
|
]
|
||||||
psValidator = def
|
psValidator = def
|
||||||
correctionsR whereClause colonnade psValidator $ Map.fromList
|
correctionsR whereClause colonnade psValidator $ Map.fromList
|
||||||
|
|||||||
@ -587,3 +587,24 @@ validateCourse (CourseForm{..}) =
|
|||||||
-- )
|
-- )
|
||||||
-- ,
|
-- ,
|
||||||
] ]
|
] ]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
getCUsersR :: TermId -> SchoolId -> CourseShorthand -> Handler Html
|
||||||
|
getCUsersR tid ssh csh = undefined -- TODO
|
||||||
|
|
||||||
|
|
||||||
|
getCUserR :: TermId -> SchoolId -> CourseShorthand -> CryptoUUIDUser -> Handler Html
|
||||||
|
getCUserR tid ssh csh uuid = do
|
||||||
|
uid <- decrypt uuid
|
||||||
|
User{..} <- runDB $ get404 uid
|
||||||
|
defaultLayout $
|
||||||
|
[whamlet|
|
||||||
|
<h1>TODO
|
||||||
|
<h2>Lecturer's Page for User ^{nameWidget userDisplayName userSurname}
|
||||||
|
|]
|
||||||
|
|
||||||
|
getCHiWisR :: TermId -> SchoolId -> CourseShorthand -> Handler Html
|
||||||
|
getCHiWisR tid ssh csh = undefined -- TODO
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user