diff --git a/src/Handler/Info.hs b/src/Handler/Info.hs index 33c0ca262..b9b8c1fa9 100644 --- a/src/Handler/Info.hs +++ b/src/Handler/Info.hs @@ -53,8 +53,16 @@ getInfoLecturerR = -- tooltipProblem = toWidget [whamlet| _{MsgLecturerInfoTooltipProblem} |] tooltipPlanned = toWidget [whamlet| _{MsgLecturerInfoTooltipPlanned} |] tooltipNewU2W = toWidget [whamlet| _{MsgLecturerInfoTooltipNewU2W} |] - newFeat, plannedFeat, newU2WFeat :: WidgetFor UniWorX () - newFeat = toWidget [whamlet| ^{iconTooltip tooltipNew (Just IconNew) False} |] + newU2WFeat, plannedFeat :: WidgetFor UniWorX () + newU2WFeat = toWidget [whamlet| ^{iconTooltip tooltipNew (Just IconAnnounce) True} |] -- to be used inside text blocks -- probFeat = toWidget [whamlet| ^{iconTooltip tooltipProblem (Just IconProblem) False} |] plannedFeat = toWidget [whamlet| ^{iconTooltip tooltipPlanned (Just IconPlanned) False} |] - newU2WFeat = toWidget [whamlet| ^{iconTooltip tooltipNewU2W (Just IconAnnounce) True} |] -- to be used inside text blocks + + -- new feature with given introduction date + newFeat :: Integer -> Int -> Int -> WidgetFor UniWorX () + newFeat year month day = do + currentTime <- liftIO getCurrentTime + let expiryTime = UTCTime (addGregorianMonthsClip 1 $ fromGregorian year month day) (secondsToDiffTime 0) + if currentTime > expiryTime + then mempty + else toWidget [whamlet| ^{iconTooltip tooltipNewU2W (Just IconNew) False} |] diff --git a/templates/i18n/info-lecturer/de.hamlet b/templates/i18n/info-lecturer/de.hamlet index e9f227c61..2dc4f5f0b 100644 --- a/templates/i18n/info-lecturer/de.hamlet +++ b/templates/i18n/info-lecturer/de.hamlet @@ -263,7 +263,7 @@ $newline text Es lassen sich aber auch zeitlich getrennte Prüfungen verwalten, wie z.B. mündliche Prüfungen bei Seminaren oder Praktika. Teilnehmern wird eine übersichtliche Tabelle aller Termine/Räume angezeigt. -
Die Berechnung der Prüfungsergebnisse kann automatisch durch Uni2work erfolgen. Dabei muss ein Notenschlüssel angegeben werden, an dem die Endnote der Studenten automatisch anhand der erreichten Punktezahl abgelesen wird. @@ -294,7 +294,7 @@ $newline text
^{newU2WFeat} Die Vorschläge können auch unabhängig vom eingetragenen Notenschlüssel manuell überschrieben werden. -
Endnoten können automatisiert an die Prüfungsämter gemeldet werden.