From e3fc2ee5a86ae8f50027e027b1688268c9d1f1c0 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 2 Jul 2018 09:26:39 +0200 Subject: [PATCH] Fix broken template & cleanup routes --- messages/de.msg | 4 ++-- routes | 4 ++-- src/Foundation.hs | 1 - templates/correction-user.hamlet | 1 + templates/submission.hamlet | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/messages/de.msg b/messages/de.msg index 2870e68cf..61cb14977 100644 --- a/messages/de.msg +++ b/messages/de.msg @@ -72,8 +72,8 @@ CorrectionsTitle: Zugewiesene Korrekturen CourseCorrectionsTitle: Korrekturen für diesen Kurs Unauthorized: Sie haben hierfür keine explizite Berechtigung. -UnauthorizedAnd l@Text r@Text: #{l} UND #{r} -UnauthorizedOr l@Text r@Text: #{l} ODER #{r} +UnauthorizedAnd l@Text r@Text: (#{l} UND #{r}) +UnauthorizedOr l@Text r@Text: (#{l} ODER #{r}) UnauthorizedSchoolAdmin: Sie sind nicht als Administrator für dieses Institut eingetragen. UnauthorizedSchoolLecturer: Sie sind nicht als Veranstalter für dieses Institut eingetragen. UnauthorizedLecturer: Sie sind nicht als Veranstalter für diese Veranstaltung eingetragen. diff --git a/routes b/routes index 39556f1c7..3345988ee 100644 --- a/routes +++ b/routes @@ -48,14 +48,14 @@ /course/ CourseListR GET !free !/course/new CourseNewR GET POST !lecturer /course/#TermId/#Text CourseR !lecturer: - /show CShowR GET !free + / CShowR GET !free /register CRegisterR POST !time /edit CEditR GET POST /subs CourseCorrectionsR GET POST /ex SheetListR GET !registered !materials !/ex/new SheetNewR GET POST /ex/#Text SheetR: - /show SShowR GET !timeANDregistered !timeANDmaterials !corrector + / SShowR GET !timeANDregistered !timeANDmaterials !corrector /edit SEditR GET POST /delete SDelR GET POST /subs SSubsR GET POST diff --git a/src/Foundation.hs b/src/Foundation.hs index 92e339f77..a0c11f56d 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -348,7 +348,6 @@ knownTags = Map.fromList -- should not throw exceptions, i.e. no getBy404 or req authId <- maybeExceptT AuthenticationRequired $ lift maybeAuthId void . maybeMExceptT (unauthorizedI MsgUnauthorizedSubmissionOwner) . getBy $ UniqueSubmissionUser authId sid return Authorized - CSheetR _ _ _ SubmissionNewR -> unauthorizedI MsgUnauthorizedSubmissionOwner r -> do $logErrorS "AccessControl" $ "'!owner' used on route that doesn't support it: " <> tshow r unauthorizedI MsgUnauthorized diff --git a/templates/correction-user.hamlet b/templates/correction-user.hamlet index 07e243267..805553b26 100644 --- a/templates/correction-user.hamlet +++ b/templates/correction-user.hamlet @@ -31,6 +31,7 @@ _{MsgAchievedPassPoints} _{MsgPassAchievedOf points passingPoints maxPoints} + $of NotGraded $maybe comment <- ratingComment _{MsgRatingComment} diff --git a/templates/submission.hamlet b/templates/submission.hamlet index 1136ddb8f..78f449800 100644 --- a/templates/submission.hamlet +++ b/templates/submission.hamlet @@ -1,4 +1,4 @@ -$maybe cID <- mCID +$maybe cID <- mcid

Archiv