diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f41c8867..28fc94b75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,83 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [14.4.0](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v14.1.1...v14.4.0) (2020-04-07) + + +### Bug Fixes + +* **dbtable:** improve sorting for haskell+sql ([fd8255d](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/fd8255d)) +* **exam-form:** allow finished without start ([fbc3680](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/fbc3680)) +* **exams:** provide bonus information in return of examBonusGrade ([731231d](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/731231d)) +* configure sessions to be strictly same-site ([a7e64bc](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/a7e64bc)) +* **i18n:** add missing translations ([773c6c5](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/773c6c5)) +* fix .dual-heated.degenerate ([6058692](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/6058692)) + + +### Features + +* persist bearer tokens in session ([d8040e7](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/d8040e7)) +* **allocations:** compute & accept allocations ([20ef95c](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/20ef95c)) +* **allocations:** display new allocations in user table ([bb20062](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/bb20062)) +* **allocations:** improve accept ui and logging ([3422fd7](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/3422fd7)) +* **allocations:** improve acceptance display ([cf03277](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/cf03277)) +* **allocations:** improve display ([26f8f39](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/26f8f39)) +* **applications-list:** add warning regarding features of study ([cdbe12c](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/cdbe12c)) +* **course-events:** add HideColumns for course events ([1138f9e](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/1138f9e)) +* **course-events:** add optional note to course events ([6ad8f2e](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/6ad8f2e)) +* **course-events:** course event note text -> html ([c8904d1](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/c8904d1)) +* **course-events:** hide note column if there are no notes to display ([1ac7f4e](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/1ac7f4e)) +* **course-events:** show notes in course events table ([b2c4125](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/b2c4125)) +* **exams:** convenience for automatic grade calculation ([ec6a8ae](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/ec6a8ae)) +* **serversessions:** move session storage to dedicated memcached ([9960059](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/9960059)), closes [#390](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/issues/390) +* more date & time formats ([936c366](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/936c366)) + + + +## [14.3.0](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v14.2.0...v14.3.0) (2020-03-31) + + +### Bug Fixes + +* **exam-form:** allow finished without start ([fbc3680](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/fbc3680)) + + +### Features + +* **course-events:** add HideColumns for course events ([1138f9e](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/1138f9e)) +* **course-events:** add optional note to course events ([6ad8f2e](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/6ad8f2e)) +* **course-events:** course event note text -> html ([c8904d1](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/c8904d1)) +* **course-events:** hide note column if there are no notes to display ([1ac7f4e](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/1ac7f4e)) +* **course-events:** show notes in course events table ([b2c4125](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/b2c4125)) + + + +## [14.2.0](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v14.1.1...v14.2.0) (2020-03-22) + + +### Bug Fixes + +* **dbtable:** improve sorting for haskell+sql ([fd8255d](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/fd8255d)) +* **exams:** provide bonus information in return of examBonusGrade ([731231d](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/731231d)) +* configure sessions to be strictly same-site ([a7e64bc](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/a7e64bc)) +* **i18n:** add missing translations ([773c6c5](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/773c6c5)) +* fix .dual-heated.degenerate ([6058692](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/6058692)) + + +### Features + +* **allocations:** compute & accept allocations ([20ef95c](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/20ef95c)) +* **allocations:** display new allocations in user table ([bb20062](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/bb20062)) +* **allocations:** improve accept ui and logging ([3422fd7](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/3422fd7)) +* **allocations:** improve acceptance display ([cf03277](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/cf03277)) +* **allocations:** improve display ([26f8f39](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/26f8f39)) +* **applications-list:** add warning regarding features of study ([cdbe12c](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/cdbe12c)) +* **exams:** convenience for automatic grade calculation ([ec6a8ae](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/ec6a8ae)) +* **serversessions:** move session storage to dedicated memcached ([9960059](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/9960059)), closes [#390](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/issues/390) +* more date & time formats ([936c366](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/936c366)) + + + ### [14.1.1](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v14.1.0...v14.1.1) (2020-03-06) diff --git a/frontend/src/app.sass b/frontend/src/app.sass index 81f4f803e..37504c6ec 100644 --- a/frontend/src/app.sass +++ b/frontend/src/app.sass @@ -831,6 +831,9 @@ th, td font-style: normal color: var(--color-font) +.course-event-note--hidden + display: none + .bound_explanation color: var(--color-fontsec) font-style: italic diff --git a/messages/uniworx/de-de-formal.msg b/messages/uniworx/de-de-formal.msg index 3c3b045fd..dc80dde29 100644 --- a/messages/uniworx/de-de-formal.msg +++ b/messages/uniworx/de-de-formal.msg @@ -2222,6 +2222,7 @@ CourseEventType: Art CourseEventTypePlaceholder: Vorlesung, Zentralübung, ... CourseEventTime: Zeit CourseEventRoom: Regulärer Raum +CourseEventNote: Notiz CourseEventActions: Aktionen CourseEventsActionEdit: Bearbeiten CourseEventsActionDelete: Löschen @@ -2427,4 +2428,4 @@ AllocationUserNewMatches: Neue Zuteilungen AllocationUsersCount: Teilnehmer AllocationCoursesCount: Kurse -CourseOption tid@TermId ssh@SchoolId coursen@CourseName: #{tid} - #{ssh} - #{coursen} \ No newline at end of file +CourseOption tid@TermId ssh@SchoolId coursen@CourseName: #{tid} - #{ssh} - #{coursen} diff --git a/messages/uniworx/en-eu.msg b/messages/uniworx/en-eu.msg index 64e10e5ca..8626e79d3 100644 --- a/messages/uniworx/en-eu.msg +++ b/messages/uniworx/en-eu.msg @@ -2220,6 +2220,7 @@ CourseEventType: Type CourseEventTypePlaceholder: Lecture, Exercise discussion, ... CourseEventTime: Time CourseEventRoom: Regular room +CourseEventNote: Note CourseEventActions: Actions CourseEventsActionEdit: Edit CourseEventsActionDelete: Delete diff --git a/models/courses.model b/models/courses.model index bea256759..12a945535 100644 --- a/models/courses.model +++ b/models/courses.model @@ -30,6 +30,7 @@ CourseEvent course CourseId room Text time Occurrences + note Html Maybe lastChanged UTCTime default=now() CourseAppInstructionFile diff --git a/package-lock.json b/package-lock.json index 65e052675..8047ddc19 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "uni2work", - "version": "14.1.1", + "version": "14.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0a395567a..bb1079892 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uni2work", - "version": "14.1.1", + "version": "14.4.0", "description": "", "keywords": [], "author": "", diff --git a/package.yaml b/package.yaml index 88b2c5bb7..8827fc4d1 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: uniworx -version: 14.1.1 +version: 14.4.0 dependencies: - base diff --git a/src/Foundation.hs b/src/Foundation.hs index 054c1ef50..98047bb6e 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -1507,7 +1507,7 @@ instance Yesod UniWorX where -- b) Validates that incoming write requests include that token in either a header or POST parameter. -- To add it, chain it together with the defaultMiddleware: yesodMiddleware = defaultYesodMiddleware . defaultCsrfMiddleware -- For details, see the CSRF documentation in the Yesod.Core.Handler module of the yesod-core package. - yesodMiddleware = observeYesodCacheSizeMiddleware . languagesMiddleware appLanguages . headerMessagesMiddleware . securityHeaderMiddleware . defaultYesodMiddleware . normalizeRouteMiddleware . csrfMiddleware . updateFavouritesMiddleware + yesodMiddleware = observeYesodCacheSizeMiddleware . languagesMiddleware appLanguages . headerMessagesMiddleware . securityHeaderMiddleware . defaultYesodMiddleware . normalizeRouteMiddleware . csrfMiddleware . updateFavouritesMiddleware . storeBearerMiddleware where securityHeaderMiddleware :: Handler a -> Handler a securityHeaderMiddleware handler = (*> handler) $ do @@ -1551,6 +1551,13 @@ instance Yesod UniWorX where if | hasBearer -> handler | otherwise -> defaultCsrfMiddleware handler + storeBearerMiddleware :: Handler a -> Handler a + storeBearerMiddleware handler = do + askBearer >>= \case + Just (Jwt bs) -> setSessionBS (toPathPiece SessionBearer) bs + Nothing -> return () + + handler -- Since we implement `errorHandler` ourselves we don't need `defaultMessageWidget` defaultMessageWidget _title _body = error "defaultMessageWidget: undefined" diff --git a/src/Handler/Course/Application/List.hs b/src/Handler/Course/Application/List.hs index 3c6835c06..dbdc50c61 100644 --- a/src/Handler/Course/Application/List.hs +++ b/src/Handler/Course/Application/List.hs @@ -680,6 +680,8 @@ postCApplicationsR tid ssh csh = do mapM_ addMessage' <=< execWriterT $ registerUsers cid applicants redirect $ CourseR tid ssh csh CUsersR + let + studyFeaturesWarning = $(i18nWidgetFile "applications-list-info") siteLayoutMsg title $ do setTitleI title diff --git a/src/Handler/Course/Events/Edit.hs b/src/Handler/Course/Events/Edit.hs index e762b3ae0..5ac391d5d 100644 --- a/src/Handler/Course/Events/Edit.hs +++ b/src/Handler/Course/Events/Edit.hs @@ -24,6 +24,7 @@ postCEvEditR tid ssh csh cID = do , courseEventType = cefType , courseEventRoom = cefRoom , courseEventTime = cefTime + , courseEventNote = cefNote , courseEventLastChanged = now } addMessageI Success MsgCourseEventEdited diff --git a/src/Handler/Course/Events/Form.hs b/src/Handler/Course/Events/Form.hs index bf9d99ca8..3cb291f89 100644 --- a/src/Handler/Course/Events/Form.hs +++ b/src/Handler/Course/Events/Form.hs @@ -15,6 +15,7 @@ data CourseEventForm = CourseEventForm { cefType :: CI Text , cefRoom :: Text , cefTime :: Occurrences + , cefNote :: Maybe Html } courseEventForm :: Maybe CourseEventForm -> Form CourseEventForm @@ -34,15 +35,18 @@ courseEventForm template = identifyForm FIDCourseEvent . renderWForm FormStandar cefType' <- wreq (textField & cfStrip & cfCI & addDatalist courseEventTypes) (fslI MsgCourseEventType & addPlaceholder (mr MsgCourseEventTypePlaceholder)) (cefType <$> template) cefRoom' <- wreq (textField & cfStrip & addDatalist courseEventRooms) (fslI MsgCourseEventRoom) (cefRoom <$> template) cefTime' <- aFormToWForm $ occurrencesAForm ("time" :: Text) (cefTime <$> template) + cefNote' <- wopt htmlField (fslI MsgCourseEventNote) (cefNote <$> template) return $ CourseEventForm <$> cefType' <*> cefRoom' <*> cefTime' + <*> cefNote' courseEventToForm :: CourseEvent -> CourseEventForm courseEventToForm CourseEvent{..} = CourseEventForm { cefType = courseEventType , cefRoom = courseEventRoom , cefTime = courseEventTime + , cefNote = courseEventNote } diff --git a/src/Handler/Course/Events/New.hs b/src/Handler/Course/Events/New.hs index 248856cad..b01f17af5 100644 --- a/src/Handler/Course/Events/New.hs +++ b/src/Handler/Course/Events/New.hs @@ -22,6 +22,7 @@ postCEventsNewR tid ssh csh = do , courseEventType = cefType , courseEventRoom = cefRoom , courseEventTime = cefTime + , courseEventNote = cefNote , courseEventLastChanged = now } encrypt eId :: DB CryptoUUIDCourseEvent diff --git a/src/Handler/Course/Show.hs b/src/Handler/Course/Show.hs index 1c8a6cca4..e419b3cce 100644 --- a/src/Handler/Course/Show.hs +++ b/src/Handler/Course/Show.hs @@ -198,6 +198,7 @@ getCShowR tid ssh csh = do , length fs <= 3 , all (notElem pathSeparator . view _2) fs ] + hiddenEventNotes = all (\(_,CourseEvent{..}) -> is _Nothing courseEventNote) events mayCreateNews <- hasWriteAccessTo $ CourseR tid ssh csh CNewsNewR mayCreateEvents <- hasWriteAccessTo $ CourseR tid ssh csh CEventsNewR diff --git a/src/Handler/Exam/Form.hs b/src/Handler/Exam/Form.hs index b6df32911..f8953f843 100644 --- a/src/Handler/Exam/Form.hs +++ b/src/Handler/Exam/Form.hs @@ -339,7 +339,7 @@ validateExam = do guardValidation MsgExamStartMustBeAfterPublishOccurrenceAssignments . fromMaybe True $ (>=) <$> efStart <*> efPublishOccurrenceAssignments guardValidation MsgExamEndMustBeAfterStart $ NTop efEnd >= NTop efStart guardValidation MsgExamFinishedMustBeAfterEnd . fromMaybe True $ (>=) <$> efFinished <*> efEnd - guardValidation MsgExamFinishedMustBeAfterStart $ NTop efFinished >= NTop efStart + guardValidation MsgExamFinishedMustBeAfterStart . fromMaybe True $ (>=) <$> efFinished <*> efStart forM_ efOccurrences $ \ExamOccurrenceForm{..} -> do guardValidation (MsgExamOccurrenceEndMustBeAfterStart eofName) $ NTop eofEnd >= NTop (Just eofStart) diff --git a/templates/course.hamlet b/templates/course.hamlet index 151a3291a..6aee55dc5 100644 --- a/templates/course.hamlet +++ b/templates/course.hamlet @@ -203,48 +203,55 @@ $# $if NTop (Just 0) < NTop (courseCapacity course) $if null events \ #{iconInvisible}
-
- - - - - $forall (cID, CourseEvent{courseEventType, courseEventTime, courseEventRoom}) <- events - toPathPiece cID}> -
- _{MsgCourseEventType} - - _{MsgCourseEventTime} - - _{MsgCourseEventRoom} - $if mayCreateEvents - - _{MsgCourseEventActions} - \ #{iconInvisible} -
-
- #{courseEventType} -
-
- ^{occurrencesWidget courseEventTime} -
-
- #{courseEventRoom} +
+
+ + + + + $forall (cID, CourseEvent{courseEventType, courseEventTime, courseEventRoom, courseEventNote}) <- events + toPathPiece cID}> - - + +
+ _{MsgCourseEventType} + + _{MsgCourseEventTime} + + _{MsgCourseEventRoom} + + _{MsgCourseEventNote} $if mayCreateEvents + + _{MsgCourseEventActions} + \ #{iconInvisible} +
-
    -
  • - ^{modal (i18n MsgCourseEventsActionEdit) (Left (SomeRoute (CEventR tid ssh csh cID CEvEditR)))} -
  • - ^{modal (i18n MsgCourseEventsActionDelete) (Left (SomeRoute (CEventR tid ssh csh cID CEvDeleteR)))} - $if mayCreateEvents -
- - - -
- ^{modal (i18n MsgCourseEventsActionCreate) (Left (SomeRoute (CourseR tid ssh csh CEventsNewR)))} +
+ #{courseEventType} +
+
+ ^{occurrencesWidget courseEventTime} +
+
+ #{courseEventRoom} +
+
+ #{courseEventNote} + $if mayCreateEvents +
+
    +
  • + ^{modal (i18n MsgCourseEventsActionEdit) (Left (SomeRoute (CEventR tid ssh csh cID CEvEditR)))} +
  • + ^{modal (i18n MsgCourseEventsActionDelete) (Left (SomeRoute (CEventR tid ssh csh cID CEvDeleteR)))} + $if mayCreateEvents +
+ + + + +
+ ^{modal (i18n MsgCourseEventsActionCreate) (Left (SomeRoute (CourseR tid ssh csh CEventsNewR)))} $if hasTutorials diff --git a/templates/course/applications-list.hamlet b/templates/course/applications-list.hamlet index fde01d6e1..cc6a07744 100644 --- a/templates/course/applications-list.hamlet +++ b/templates/course/applications-list.hamlet @@ -25,4 +25,5 @@ $if mayAccept

_{MsgMenuCourseApplications} + ^{notification NotificationBroad =<< messageWidget Warning studyFeaturesWarning} ^{table} diff --git a/templates/i18n/applications-list-info/de-de-formal.hamlet b/templates/i18n/applications-list-info/de-de-formal.hamlet new file mode 100644 index 000000000..d1aa9b4a8 --- /dev/null +++ b/templates/i18n/applications-list-info/de-de-formal.hamlet @@ -0,0 +1,7 @@ +$newline never +

+ Beachten Sie bitte, dass Uni2work die Studiendaten von der zentralen Verwaltung bezieht und deswegen die Daten, insbesondere das Fachsemester und das Studienfach, oft nicht dem aktuellen Stand entsprechen oder gar fehlen können (Studiengangswechsel, Fachsemestereinstufungen, ...). +

+ Widersprechen Sie daher bitte nicht aufgrund der Studiendaten, oder weil Studiendaten fehlen, der Zuteilung eines Studierenden zu Ihrem Kurs (Veto bzw. 5.0). +

+ Der Studienfortschritt der Bewerber fließt über die Berechnung der Dringlichkeit, mit der ein Studierender einen Platz benötigt, in die Vergabe mit ein. diff --git a/templates/i18n/applications-list-info/en-eu.hamlet b/templates/i18n/applications-list-info/en-eu.hamlet new file mode 100644 index 000000000..235cb6345 --- /dev/null +++ b/templates/i18n/applications-list-info/en-eu.hamlet @@ -0,0 +1,7 @@ +$newline never +

+ Please note that Uni2work obtains the features of study from the central administration and therefore this data (especially semester and subject) often is out of date or may even be missing (change of field of study, semester classification, ...). +

+ Therefore, please do not reject applicants because of their features of study or because of missing features of study (veto or 5.0). +

+ The study progress of the applicants influences the allocation by means of the urgency with which a student needs a place.