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