diff --git a/messages/uniworx/utils/navigation/menu/de-de-formal.msg b/messages/uniworx/utils/navigation/menu/de-de-formal.msg index f6ab783b9..5fd9bd184 100644 --- a/messages/uniworx/utils/navigation/menu/de-de-formal.msg +++ b/messages/uniworx/utils/navigation/menu/de-de-formal.msg @@ -98,6 +98,7 @@ MenuLecturerInvite: Funktionäre hinzufügen MenuSchoolList: Bereiche MenuSchoolNew: Neuen Bereich anlegen MenuSchoolDay ssh@SchoolId d@Text: #{d} #{unSchoolKey ssh} Tagesansicht +MenuSchoolDayCheck: Konsistenzprüfung MenuExternalExamGrades: Prüfungsleistungen MenuExternalExamUsers: Teilnehmer:innen MenuExternalExamEdit: Bearbeiten diff --git a/messages/uniworx/utils/navigation/menu/en-eu.msg b/messages/uniworx/utils/navigation/menu/en-eu.msg index 594f9c320..10d8617f5 100644 --- a/messages/uniworx/utils/navigation/menu/en-eu.msg +++ b/messages/uniworx/utils/navigation/menu/en-eu.msg @@ -98,6 +98,7 @@ MenuLecturerInvite: Add functionaries MenuSchoolList: Departments MenuSchoolNew: Create new department MenuSchoolDay ssh d: #{d} #{unSchoolKey ssh} Agenda +MenuSchoolDayCheck: Consistence check MenuExternalExamGrades: Exam results MenuExternalExamUsers: Participants MenuExternalExamEdit: Edit diff --git a/routes b/routes index 807ec5582..520c38250 100644 --- a/routes +++ b/routes @@ -1,4 +1,4 @@ --- SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel , Gregor Kleen , Sarah Vaupel , Steffen Jost , Wolfgang Witt , Steffeb Jost +-- SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel , Gregor Kleen , Sarah Vaupel , Steffen Jost , Wolfgang Witt , Steffen Jost -- -- SPDX-License-Identifier: AGPL-3.0-or-later @@ -159,6 +159,7 @@ /school/#SchoolId SchoolR: /edit SchoolEditR GET POST /day/#Day SchoolDayR GET POST + /day/#Day/check SchoolDayCheckR GET /participants ParticipantsListR GET !evaluation /participants/#TermId/#SchoolId ParticipantsR GET !evaluation diff --git a/src/Foundation/Navigation.hs b/src/Foundation/Navigation.hs index 367fe7a21..d4784b963 100644 --- a/src/Foundation/Navigation.hs +++ b/src/Foundation/Navigation.hs @@ -143,7 +143,7 @@ breadcrumb PrintAckR{} = i18nCrumb MsgMenuPrintSend $ Just PrintCenter breadcrumb PrintAckDirectR{}= i18nCrumb MsgMenuPrintAck $ Just PrintCenterR breadcrumb PrintLogR = i18nCrumb MsgMenuPrintLog $ Just PrintCenterR -breadcrumb SchoolListR = i18nCrumb MsgMenuSchoolList $ Just AdminR +breadcrumb SchoolListR = i18nCrumb MsgMenuSchoolList $ Just AdminR breadcrumb (SchoolR ssh SchoolEditR) = useRunDB . maybeT (i18nCrumb MsgBreadcrumbSchool $ Just SchoolListR) $ do School{..} <- MaybeT $ get ssh @@ -153,7 +153,9 @@ breadcrumb (SchoolR ssh (SchoolDayR d)) = do dt <- formatTime SelFormatDate d mr <- getMessageRender return (mr $ MsgMenuSchoolDay ssh dt, Just SchoolListR) -breadcrumb SchoolNewR = i18nCrumb MsgMenuSchoolNew $ Just SchoolListR +breadcrumb (SchoolR ssh (SchoolDayCheckR d)) + = i18nCrumb MsgMenuSchoolDayCheck $ Just (SchoolR ssh (SchoolDayR d)) +breadcrumb SchoolNewR = i18nCrumb MsgMenuSchoolNew $ Just SchoolListR breadcrumb (ExamOfficeR EOExamsR) = i18nCrumb MsgMenuExamOfficeExams Nothing breadcrumb (ExamOfficeR EOFieldsR) = i18nCrumb MsgMenuExamOfficeFields . Just $ ExamOfficeR EOExamsR @@ -1201,7 +1203,12 @@ pageActions SchoolListR = return , navChildren = [] } ] -pageActions (SchoolR ssh (SchoolDayR nd)) = return +pageActions (SchoolR ssh (SchoolDayR nd)) = return $ + ( NavPageActionPrimary + { navLink = defNavLinkModal MsgMenuSchoolDayCheck $ SchoolR ssh $ SchoolDayCheckR nd + , navChildren = [] + } + ) : [ NavPageActionPrimary { navLink = defNavLink msg $ SchoolR ssh (SchoolDayR $ addDays n nd) , navChildren = [] diff --git a/src/Handler/School/DayTasks.hs b/src/Handler/School/DayTasks.hs index 05e471b74..257a0201b 100644 --- a/src/Handler/School/DayTasks.hs +++ b/src/Handler/School/DayTasks.hs @@ -632,7 +632,7 @@ postSchoolDayR ssh nd = do (fmap unFormResult -> tableRes, tableDaily) <- runDB $ mkDailyTable isAdmin ssh nd -- logInfoS "****DailyTable****" $ tshow tableRes formResult tableRes $ \resMap -> do - tuts <- runDB $ forM (Map.toList resMap) $ \(tpid, DailyFormData{..}) -> do + _tuts <- runDB $ forM (Map.toList resMap) $ \(tpid, DailyFormData{..}) -> do -- logDebugS "TableForm" (tshow dfd) TutorialParticipant{..} <- get404 tpid -- needed anyway to find the ParticipantDay/UserDay updated when ( tutorialParticipantDrivingPermit /= dailyFormDrivingPermit @@ -654,10 +654,10 @@ postSchoolDayR ssh nd = do then flip upsertBy_ (UserDay tutorialParticipantUser nd dailyFormParkingToken) -- upsert if a permit was issued else updateBy -- only update to no permit, if the record exists, but do not create a fresh record with parkingToken==False updateUserDay udUq [ UserDayParkingToken =. dailyFormParkingToken] - return $ tutorialParticipantTutorial - forM_ tuts $ \tid -> do - memcachedByInvalidate (CacheKeySuggsParticipantNote ssh tid) $ Proxy @(OptionListCacheable Text) - memcachedByInvalidate (CacheKeySuggsAttendanceNote ssh tid) $ Proxy @(OptionListCacheable Text) + return tutorialParticipantTutorial + -- forM_ tuts $ \tid -> do -- TODO reinstate this after test + -- memcachedByInvalidate (CacheKeySuggsParticipantNote ssh tid) $ Proxy @(OptionListCacheable Text) + -- memcachedByInvalidate (CacheKeySuggsAttendanceNote ssh tid) $ Proxy @(OptionListCacheable Text) -- audit log? Currently decided against. addMessageI Success $ MsgTutorialParticipantsDayEdits dday redirect $ SchoolR ssh $ SchoolDayR nd @@ -671,6 +671,9 @@ getSchoolDayCheckR :: SchoolId -> Day -> Handler Html getSchoolDayCheckR ssh nd = do -- isAdmin <- hasReadAccessTo AdminR dday <- formatTime SelFormatDate nd - siteLayoutMsg (MsgMenuSchoolDay ssh dday) $ do - setTitleI (MsgMenuSchoolDay ssh dday) - [whamlet|TODO: this is just a stub.|] \ No newline at end of file + siteLayoutMsg MsgMenuSchoolDayCheck $ do + setTitleI MsgMenuSchoolDayCheck + [whamlet| + TODO: this is just a stub. + _{MsgMenuSchoolDay ssh dday} + |] \ No newline at end of file