chore(users): remove eppn support
This commit is contained in:
parent
55bf8c0355
commit
899071e4d6
@ -204,7 +204,6 @@ data UserTableCsv = UserTableCsv
|
|||||||
, csvUserSex :: Maybe Sex
|
, csvUserSex :: Maybe Sex
|
||||||
, csvUserBirthday :: Maybe Day
|
, csvUserBirthday :: Maybe Day
|
||||||
, csvUserMatriculation :: Maybe UserMatriculation
|
, csvUserMatriculation :: Maybe UserMatriculation
|
||||||
, csvUserEPPN :: Maybe UserEduPersonPrincipalName
|
|
||||||
, csvUserEmail :: UserEmail
|
, csvUserEmail :: UserEmail
|
||||||
, csvUserQualifications :: [QualificationName]
|
, csvUserQualifications :: [QualificationName]
|
||||||
, csvUserSubmissionGroup :: Maybe SubmissionGroupName
|
, csvUserSubmissionGroup :: Maybe SubmissionGroupName
|
||||||
@ -224,7 +223,6 @@ instance Csv.ToNamedRecord UserTableCsv where
|
|||||||
, "sex" Csv..= csvUserSex
|
, "sex" Csv..= csvUserSex
|
||||||
, "birthday" Csv..= csvUserBirthday
|
, "birthday" Csv..= csvUserBirthday
|
||||||
, "matriculation" Csv..= csvUserMatriculation
|
, "matriculation" Csv..= csvUserMatriculation
|
||||||
, "eduPersonPrincipalName" Csv..= csvUserEPPN
|
|
||||||
, "email" Csv..= csvUserEmail
|
, "email" Csv..= csvUserEmail
|
||||||
, "qualifications" Csv..= CsvSemicolonList csvUserQualifications
|
, "qualifications" Csv..= CsvSemicolonList csvUserQualifications
|
||||||
, "submission-group" Csv..= csvUserSubmissionGroup
|
, "submission-group" Csv..= csvUserSubmissionGroup
|
||||||
@ -286,7 +284,6 @@ data UserTableJson = UserTableJson
|
|||||||
, jsonUserName :: UserDisplayName
|
, jsonUserName :: UserDisplayName
|
||||||
, jsonUserSex :: Maybe (Maybe Sex)
|
, jsonUserSex :: Maybe (Maybe Sex)
|
||||||
, jsonUserMatriculation :: Maybe UserMatriculation
|
, jsonUserMatriculation :: Maybe UserMatriculation
|
||||||
, jsonUserEPPN :: Maybe UserEduPersonPrincipalName
|
|
||||||
, jsonUserEmail :: UserEmail
|
, jsonUserEmail :: UserEmail
|
||||||
, jsonUserQualifications :: Set QualificationName
|
, jsonUserQualifications :: Set QualificationName
|
||||||
, jsonUserSubmissionGroup :: Maybe SubmissionGroupName
|
, jsonUserSubmissionGroup :: Maybe SubmissionGroupName
|
||||||
@ -323,7 +320,6 @@ instance ToJSON UserTableJson where
|
|||||||
, pure $ "name" JSON..= jsonUserName
|
, pure $ "name" JSON..= jsonUserName
|
||||||
, ("sex" JSON..=) <$> jsonUserSex
|
, ("sex" JSON..=) <$> jsonUserSex
|
||||||
, ("matriculation" JSON..=) <$> jsonUserMatriculation
|
, ("matriculation" JSON..=) <$> jsonUserMatriculation
|
||||||
, ("eduPersonPrincipalName" JSON..=) <$> jsonUserEPPN
|
|
||||||
, pure $ "email" JSON..= jsonUserEmail
|
, pure $ "email" JSON..= jsonUserEmail
|
||||||
, ("qualifications" JSON..=) <$> assertM' (not . onull) jsonUserQualifications
|
, ("qualifications" JSON..=) <$> assertM' (not . onull) jsonUserQualifications
|
||||||
, ("submission-group" JSON..=) <$> jsonUserSubmissionGroup
|
, ("submission-group" JSON..=) <$> jsonUserSubmissionGroup
|
||||||
@ -566,7 +562,6 @@ makeCourseUserTable cid acts restrict colChoices psValidator csvColumns = do
|
|||||||
<*> view (hasUser . _userSex)
|
<*> view (hasUser . _userSex)
|
||||||
<*> view (hasUser . _userBirthday)
|
<*> view (hasUser . _userBirthday)
|
||||||
<*> view (hasUser . _userMatrikelnummer)
|
<*> view (hasUser . _userMatrikelnummer)
|
||||||
<*> view (hasUser . _userLdapPrimaryKey)
|
|
||||||
<*> view (hasUser . _userEmail)
|
<*> view (hasUser . _userEmail)
|
||||||
<*> (over traverse (qualificationName . entityVal) <$> view _userQualifications)
|
<*> (over traverse (qualificationName . entityVal) <$> view _userQualifications)
|
||||||
<*> preview (_userSubmissionGroup . _entityVal . _submissionGroupName)
|
<*> preview (_userSubmissionGroup . _entityVal . _submissionGroupName)
|
||||||
@ -598,7 +593,6 @@ makeCourseUserTable cid acts restrict colChoices psValidator csvColumns = do
|
|||||||
<*> view (hasUser . _userDisplayName)
|
<*> view (hasUser . _userDisplayName)
|
||||||
<*> views (hasUser . _userSex) (guardOn showSex)
|
<*> views (hasUser . _userSex) (guardOn showSex)
|
||||||
<*> view (hasUser . _userMatrikelnummer)
|
<*> view (hasUser . _userMatrikelnummer)
|
||||||
<*> view (hasUser . _userLdapPrimaryKey)
|
|
||||||
<*> view (hasUser . _userEmail)
|
<*> view (hasUser . _userEmail)
|
||||||
<*> view (_userQualifications . folded . to (Set.singleton . qualificationName . entityVal))
|
<*> view (_userQualifications . folded . to (Set.singleton . qualificationName . entityVal))
|
||||||
<*> preview (_userSubmissionGroup . _entityVal . _submissionGroupName)
|
<*> preview (_userSubmissionGroup . _entityVal . _submissionGroupName)
|
||||||
|
|||||||
@ -187,7 +187,6 @@ data ExamUserTableCsv = ExamUserTableCsv
|
|||||||
, csvEUserFirstName :: Maybe Text
|
, csvEUserFirstName :: Maybe Text
|
||||||
, csvEUserName :: Maybe Text
|
, csvEUserName :: Maybe Text
|
||||||
, csvEUserMatriculation :: Maybe Text
|
, csvEUserMatriculation :: Maybe Text
|
||||||
, csvEUserEPPN :: Maybe UserEduPersonPrincipalName
|
|
||||||
, csvEUserStudyFeatures :: UserTableStudyFeatures
|
, csvEUserStudyFeatures :: UserTableStudyFeatures
|
||||||
, csvEUserOccurrence :: Maybe (CI Text)
|
, csvEUserOccurrence :: Maybe (CI Text)
|
||||||
, csvEUserExercisePoints :: Maybe (Maybe Points)
|
, csvEUserExercisePoints :: Maybe (Maybe Points)
|
||||||
@ -208,7 +207,6 @@ instance ToNamedRecord ExamUserTableCsv where
|
|||||||
, "first-name" Csv..= csvEUserFirstName
|
, "first-name" Csv..= csvEUserFirstName
|
||||||
, "name" Csv..= csvEUserName
|
, "name" Csv..= csvEUserName
|
||||||
, "matriculation" Csv..= csvEUserMatriculation
|
, "matriculation" Csv..= csvEUserMatriculation
|
||||||
, "eduPersonPrincipalName" Csv..= csvEUserEPPN
|
|
||||||
, "study-features" Csv..= csvEUserStudyFeatures
|
, "study-features" Csv..= csvEUserStudyFeatures
|
||||||
, "occurrence" Csv..= csvEUserOccurrence
|
, "occurrence" Csv..= csvEUserOccurrence
|
||||||
] ++ catMaybes
|
] ++ catMaybes
|
||||||
@ -234,7 +232,6 @@ instance FromNamedRecord ExamUserTableCsv where
|
|||||||
<*> csv .:?? "first-name"
|
<*> csv .:?? "first-name"
|
||||||
<*> csv .:?? "name"
|
<*> csv .:?? "name"
|
||||||
<*> csv .:?? "matriculation"
|
<*> csv .:?? "matriculation"
|
||||||
<*> csv .:?? "eduPersonPrincipalName"
|
|
||||||
<*> pure mempty
|
<*> pure mempty
|
||||||
<*> csv .:?? "occurrence"
|
<*> csv .:?? "occurrence"
|
||||||
<*> fmap Just (csv .:?? "exercise-points")
|
<*> fmap Just (csv .:?? "exercise-points")
|
||||||
@ -277,7 +274,7 @@ examUserTableCsvHeader :: ( MonoFoldable mono
|
|||||||
=> SheetGradeSummary -> Bool -> mono -> Csv.Header
|
=> SheetGradeSummary -> Bool -> mono -> Csv.Header
|
||||||
examUserTableCsvHeader allBoni doBonus pNames = Csv.header $
|
examUserTableCsvHeader allBoni doBonus pNames = Csv.header $
|
||||||
[ "surname", "first-name", "name"
|
[ "surname", "first-name", "name"
|
||||||
, "matriculation", "eduPersonPrincipalName"
|
, "matriculation"
|
||||||
, "study-features"
|
, "study-features"
|
||||||
, "course-note"
|
, "course-note"
|
||||||
, "occurrence"
|
, "occurrence"
|
||||||
@ -615,7 +612,6 @@ postEUsersR tid ssh csh examn = do
|
|||||||
<*> view (resultUser . _entityVal . _userFirstName . to Just)
|
<*> view (resultUser . _entityVal . _userFirstName . to Just)
|
||||||
<*> view (resultUser . _entityVal . _userDisplayName . to Just)
|
<*> view (resultUser . _entityVal . _userDisplayName . to Just)
|
||||||
<*> view (resultUser . _entityVal . _userMatrikelnummer)
|
<*> view (resultUser . _entityVal . _userMatrikelnummer)
|
||||||
<*> view (resultUser . _entityVal . _userLdapPrimaryKey)
|
|
||||||
<*> view resultStudyFeatures
|
<*> view resultStudyFeatures
|
||||||
<*> preview (resultExamOccurrence . _entityVal . _examOccurrenceName)
|
<*> preview (resultExamOccurrence . _entityVal . _examOccurrenceName)
|
||||||
<*> fmap (bool (const Nothing) Just showPoints) (preview $ resultUser . _entityKey . to (examBonusAchieved ?? bonus) . _achievedPoints . _Wrapped)
|
<*> fmap (bool (const Nothing) Just showPoints) (preview $ resultUser . _entityKey . to (examBonusAchieved ?? bonus) . _achievedPoints . _Wrapped)
|
||||||
@ -939,7 +935,6 @@ postEUsersR tid ssh csh examn = do
|
|||||||
guessUser' ExamUserTableCsv{..} = do
|
guessUser' ExamUserTableCsv{..} = do
|
||||||
let criteria = PredDNF . maybe Set.empty Set.singleton . fromNullable . Set.fromList . fmap PLVariable $ catMaybes
|
let criteria = PredDNF . maybe Set.empty Set.singleton . fromNullable . Set.fromList . fmap PLVariable $ catMaybes
|
||||||
[ GuessUserMatrikelnummer <$> csvEUserMatriculation
|
[ GuessUserMatrikelnummer <$> csvEUserMatriculation
|
||||||
, GuessUserEduPersonPrincipalName <$> csvEUserEPPN
|
|
||||||
, GuessUserDisplayName <$> csvEUserName
|
, GuessUserDisplayName <$> csvEUserName
|
||||||
, GuessUserSurname <$> csvEUserSurname
|
, GuessUserSurname <$> csvEUserSurname
|
||||||
, GuessUserFirstName <$> csvEUserFirstName
|
, GuessUserFirstName <$> csvEUserFirstName
|
||||||
|
|||||||
Reference in New Issue
Block a user