diff --git a/messages/faq/de-de-formal.msg b/messages/faq/de-de-formal.msg index 092366c09..bc424609f 100644 --- a/messages/faq/de-de-formal.msg +++ b/messages/faq/de-de-formal.msg @@ -1,6 +1,8 @@ FAQNoCampusAccount: Ich habe keine LMU-Benutzerkennung (ehem. Campus-Kennung); kann ich trotzdem Zugang zum System erhalten? FAQForgottenPassword: Ich habe mein Passwort vergessen FAQCampusCantLogin: Ich kann mich mit meiner LMU-Benutzerkennung (ehem. Campus-Kennung) nicht anmelden -FAQCourseCorrectorsTutors: Wie kann ich Tutoren oder Korrektoren für meinen Kurs einstellen? +FAQCourseCorrectorsTutors: Wie kann ich Tutoren oder Korrektoren für meinen Kurs konfigurieren? FAQNotLecturerHowToCreateCourses: Wie kann ich einen neuen Kurs anlegen? -FAQExamPoints: Warum kann ich bei meiner Klausur keine Punkte eintragen? \ No newline at end of file +FAQExamPoints: Warum kann ich bei meiner Klausur keine Punkte eintragen? +FAQInvalidCredentialsAdAccountDisabled: Ich kann mich nicht anmelden und bekomme die Meldung „Benutzereintrag gesperrt“ +FAQAllocationNoPlaces: Ich habe über eine Zentralanmeldung keine Plätze/nicht die Plätze, die ich möchte, erhalten \ No newline at end of file diff --git a/messages/faq/en-eu.msg b/messages/faq/en-eu.msg index 1cce5d04b..51c56628f 100644 --- a/messages/faq/en-eu.msg +++ b/messages/faq/en-eu.msg @@ -4,3 +4,5 @@ FAQCampusCantLogin: I can't log in using my LMU user ID (formerly Campus-ID) FAQCourseCorrectorsTutors: How can I add tutors or correctors to my course? FAQNotLecturerHowToCreateCourses: How can I create new courses? FAQExamPoints: Why can't I enter achievements for my exam as points? +FAQInvalidCredentialsAdAccountDisabled: I can't log in and am instead given the message “Account disabled” +FAQAllocationNoPlaces: I did not receive any places/the places I wanted from a central allocation \ No newline at end of file diff --git a/messages/uniworx/de-de-formal.msg b/messages/uniworx/de-de-formal.msg index c6107bd5e..6d76bf8c5 100644 --- a/messages/uniworx/de-de-formal.msg +++ b/messages/uniworx/de-de-formal.msg @@ -206,6 +206,7 @@ CourseAllocationMinCapacityTip: Wenn der Veranstaltung bei der Zentralanmeldung CourseAllocationMinCapacityMustBeNonNegative: Minimale Teilnehmeranzahl darf nicht negativ sein CourseAllocationCourseAcceptsSubstitutesUntil: Akzeptiert Nachrücker bis CourseAllocationCourseAcceptsSubstitutesNever: Akzeptiert keine Nachrücker +CourseAllocationCourseParticipants: Teilnehmer CourseApplicationInstructions: Anweisungen zur Bewerbung/Anmeldung CourseApplicationInstructionsTip: Wird den Studierenden angezeigt, wenn diese sich für Ihre Veranstaltung bewerben bzw. bei dieser anmelden CourseApplicationTemplate: Bewerbungsvorlagen @@ -2271,6 +2272,7 @@ AllocationNotificationNewCourseCurrentlyOn: Aktuell würden Sie benachrichtigt w AllocationNotificationLoginFirst: Um Ihre Benachrichtigungseinstellungen zu ändern, loggen Sie sich bitte zunächst ein. AllocationNextSubstitutesDeadline: Nächster Kurs akzeptiert Nachrücker bis AllocationNextSubstitutesDeadlineNever: Keine Kurse akzeptieren mehr Nachrücker +AllocationFreeCapacity: Freie Plätze AllocationSchoolShort: Institut Allocation: Zentralanmeldung diff --git a/messages/uniworx/en-eu.msg b/messages/uniworx/en-eu.msg index 989eb2b61..e823b35ba 100644 --- a/messages/uniworx/en-eu.msg +++ b/messages/uniworx/en-eu.msg @@ -206,6 +206,7 @@ CourseAllocationMinCapacityTip: If fewer students than this number were to be as CourseAllocationMinCapacityMustBeNonNegative: Minimum number of participants must not be negative CourseAllocationCourseAcceptsSubstitutesUntil: Accepts substitutes until CourseAllocationCourseAcceptsSubstitutesNever: Does not accept substitutes +CourseAllocationCourseParticipants: Participants CourseApplicationInstructions: Instructions for application CourseApplicationInstructionsTip: Will be shown to students if they decide to apply for this course CourseApplicationTemplate: Application template @@ -2270,6 +2271,7 @@ AllocationNotificationNewCourseCurrentlyOn: Currently you would be notified. AllocationNotificationLoginFirst: To change your notification settings, please log in first. AllocationNextSubstitutesDeadline: Next course accepts substitutes until AllocationNextSubstitutesDeadlineNever: No course currently accepts substitutes +AllocationFreeCapacity: Free capacity AllocationSchoolShort: Department Allocation: Central allocation diff --git a/src/Auth/LDAP.hs b/src/Auth/LDAP.hs index 471e59dd7..597163cd4 100644 --- a/src/Auth/LDAP.hs +++ b/src/Auth/LDAP.hs @@ -160,6 +160,7 @@ campusUserMatr' pool mode newtype ADInvalidCredentials = ADInvalidCredentials ADError deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving newtype (Universe, Finite, Enum, Bounded, PathPiece, ToJSON, FromJSON, ToJSONKey, FromJSONKey) isUnusualADError :: ADError -> Bool isUnusualADError = flip notElem [ADNoSuchObject, ADLogonFailure] @@ -220,7 +221,7 @@ campusLogin pool mode = AuthPlugin{..} $logInfoS apName [st|#{campusIdent}: #{toPathPiece adError}|] observeLoginOutcome apName LoginADInvalidCredentials MsgRenderer mr <- liftHandler getMsgRenderer - setSessionJson SessionError . PermissionDenied . mr $ ADInvalidCredentials adError + setSessionJson SessionError . PermissionDenied . toPathPiece $ ADInvalidCredentials adError loginErrorMessage (tp LoginR) . mr $ ADInvalidCredentials adError Right (Left bindErr) -> do case bindErr of diff --git a/src/Handler/Info.hs b/src/Handler/Info.hs index 99a748da2..43110c6cc 100644 --- a/src/Handler/Info.hs +++ b/src/Handler/Info.hs @@ -14,6 +14,8 @@ import qualified Database.Esqueleto.Utils as E import Development.GitRev +import Auth.LDAP (ADError(..), ADInvalidCredentials(..)) + -- | Versionsgeschichte getVersionR :: Handler TypedContent getVersionR = selectRep $ do @@ -181,6 +183,26 @@ showFAQ (CExamR tid ssh csh examn _) FAQExamPoints E.&&. course E.^. CourseSchool E.==. E.val ssh E.&&. course E.^. CourseShorthand E.==. E.val csh E.&&. exam E.^. ExamName E.==. E.val examn +showFAQ _ FAQInvalidCredentialsAdAccountDisabled = maybeT (return False) $ do + guardM $ is _Nothing <$> maybeAuthId + sessionError <- MaybeT $ lookupSessionJson SessionError + guard $ sessionError == PermissionDenied (toPathPiece $ ADInvalidCredentials ADAccountDisabled) + return True +showFAQ _ FAQAllocationNoPlaces = maybeT (return False) $ do + uid <- MaybeT maybeAuthId + now <- liftIO getCurrentTime + liftHandler . runDB . E.selectExists . E.from $ \allocation -> do + let doneSince = E.subSelectMaybe . E.from $ \participant -> do + E.where_ $ participant E.^. CourseParticipantAllocated E.==. E.just (allocation E.^. AllocationId) + return . E.max_ $ participant E.^. CourseParticipantRegistration + isAllocationUser = E.exists . E.from $ \allocationUser -> + E.where_ $ allocationUser E.^. AllocationUserAllocation E.==. allocation E.^. AllocationId + E.&&. allocationUser E.^. AllocationUserUser E.==. E.val uid + isApplicant = E.exists . E.from $ \courseApplication -> + E.where_ $ courseApplication E.^. CourseApplicationAllocation E.==. E.just (allocation E.^. AllocationId) + E.&&. courseApplication E.^. CourseApplicationUser E.==. E.val uid + E.where_ $ isAllocationUser E.||. isApplicant + E.where_ $ E.maybe E.false (\done -> done E.>=. E.val (addUTCTime (-7 * nominalDay) now)) doneSince showFAQ _ _ = return False prioFAQ :: Monad m @@ -191,3 +213,5 @@ prioFAQ _ FAQForgottenPassword = return 1 prioFAQ _ FAQNotLecturerHowToCreateCourses = return 1 prioFAQ _ FAQCourseCorrectorsTutors = return 1 prioFAQ _ FAQExamPoints = return 2 +prioFAQ _ FAQAllocationNoPlaces = return 2 +prioFAQ _ FAQInvalidCredentialsAdAccountDisabled = return 3 diff --git a/templates/i18n/faq/allocation-no-places.de-de-formal.hamlet b/templates/i18n/faq/allocation-no-places.de-de-formal.hamlet new file mode 100644 index 000000000..55c53c6e5 --- /dev/null +++ b/templates/i18n/faq/allocation-no-places.de-de-formal.hamlet @@ -0,0 +1,108 @@ +$newline never +
+ Die Plätze in den Zentralanmeldungen werden nach den folgenden # + Kriterien verteilt (in grober Reihenfolge des Einfluss, den sie auf # + die Verteilung haben): + +
+
+ Wenn Sie also keine Plätze in der Zentralanmeldung erhalten haben, #
+ liegt dies für gewöhnlich daran, dass Ihre zentrale Dringlichkeit in #
+ dieser Vergabe zu gering war und stattdessen andere Bewerber, mit #
+ weiter fortgeschrittenem Studium, Plätze erhalten haben.
+
+
+
+ Ebenso kann es sein, dass Sie nicht Ihre erste Wahl erhalten, wenn #
+ diese unter Studierenden mit höherer Dringlichkeit beliebt ist.
+
+
+
+ So wird sichergestellt, dass der Studienabschluss nicht durch #
+ fehlende Credits verzögert wird, die nur in Kursen erreicht werden #
+ können, die an einer Zentralanmeldung teilnehmen.
+
+
+
+ Für gewöhnlich gibt es zu jeder Zentralanmeldung auch ein #
+ Nachrückerverfahren. #
+
+ Es werden hierfür auf Basis der Bewerbungen für die #
+ Zentralanmeldungen Plätze, die wieder frei werden, erneut verteilt.
+
+
+
+ Die Kriterien für diese Verteilungen sind die selben, wie auch bei #
+ der ursprünglichen Verteilung. #
+
+
+
+ Wenn Sie sich bereits in der Zentralanmeldung beworben haben, ist #
+ eine gesonderte Anmeldung oder Bewerbung als Nachrücker nicht #
+ erforderlich. #
+
+ Sie werden automatisch benachrichtigt, falls Sie über das #
+ Nachrückerverfahren doch noch einen Platz bzw. zusätzliche Plätze #
+ erhalten (außer Sie haben diese Benachrichtigung aktiv unter #
+ „Anpassen“ ausgeschaltet).
+
+
+ Um in der nächsten Zentralanmeldung eine bessere Chance auf einen # + Platz zu haben können Sie folgende Schritte ergreifen: + +
+ Placements in central allocations are allocated according to the # + following criteria (ordered roughly by their impact on the # + allocation): + +
+ If you were not allocated any placements this is usually because #
+ your central priority was too low. #
+
+ Instead other applicants with higher central priority, and thus a #
+ higher degree of study progress, have received placements.
+
+
+
+ Accordingly you may not have received the placements you wanted #
+ because the respective courses were popular among applicants with #
+ higher central priority.
+
+
+
+ This method of allocation ensures that graduation is not impeded by #
+ missing credits which can only be gained through courses which #
+ participate in a central allocation.
+
+
+
+ There usually is a process for substitute registrations. #
+
+ Places that become free after the initial allocation are assigned #
+ again on the basis of the existing applications.
+
+
+
+ The criteria for the allocation of placements are the same as for #
+ the initial allocation.
+
+
+
+ If you have already applied for the central allocation no further #
+ registration or application is necessary to be assigned a substitute #
+ registration. #
+
+ You will be notified automatically if you are assigned additional #
+ placements (unless you have actively disabled the notification under #
+ “Settings”).
+
+
+ + To improve your chances of being allocated a placement during the # + next central allocation, you may try the following: + +
+ Gewöhnlicherweise wird Ihr Benutzereintrag gesperrt, wenn sie # + exmatrikuliert werden bzw. Ihr Beschäftigungsverhältnis endet. # + + Es kommt gelegentlich vor, dass Ihr Benutzereintrag nicht korrekt # + entsperrt wird, wenn Sie wieder immatrikuliert bzw. eingestellt # + werden. + +
+ Falls Sie aktuell immatrikuliert bzw. eingestellt sind, oder Sie # + einen anderen triftigen Grund vorweisen können, warum Sie Zugang zu # + Uni2work brauchen, wenden Sie sich bitte über # + das Hilfe-Formular, oben rechts auf jeder # + Seite, an die Uni2work-Administration und schildern Sie Ihre # + Situation. diff --git a/templates/i18n/faq/invalid-credentials-ad-account-disabled.en-eu.hamlet b/templates/i18n/faq/invalid-credentials-ad-account-disabled.en-eu.hamlet new file mode 100644 index 000000000..9e2df00f4 --- /dev/null +++ b/templates/i18n/faq/invalid-credentials-ad-account-disabled.en-eu.hamlet @@ -0,0 +1,14 @@ +$newline never + +
+ Usually your account is disabled once you are no longer matriculated # + (i.e. registered as a student) or employed. # + + Occasionally accounts are not correctly re-enabled once you are # + matriculated or employed, again. + +
+ If you are currently matriculated, employed, or have another good # + reason why you should have access to Uni2work, please contact a # + Uni2work-Administrator using the Support form # + (at the top right of every page) and describe your situation.