Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
bf8f00fb
Commit
bf8f00fb
authored
11 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-852: strictly match the identifier and don't use standard search with like
parent
c539551e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/course/assessment/bulk/ValidationStepForm.java
+9
-10
9 additions, 10 deletions
...a/org/olat/course/assessment/bulk/ValidationStepForm.java
with
9 additions
and
10 deletions
src/main/java/org/olat/course/assessment/bulk/ValidationStepForm.java
+
9
−
10
View file @
bf8f00fb
...
...
@@ -47,6 +47,7 @@ import org.olat.course.assessment.model.BulkAssessmentDatas;
import
org.olat.course.assessment.model.BulkAssessmentRow
;
import
org.olat.course.assessment.model.BulkAssessmentSettings
;
import
org.olat.course.nodes.AssessableCourseNode
;
import
org.olat.user.UserManager
;
/**
*
...
...
@@ -58,17 +59,18 @@ public class ValidationStepForm extends StepFormBasicController {
private
static
final
String
[]
userPropsToSearch
=
new
String
[]{
UserConstants
.
EMAIL
,
UserConstants
.
INSTITUTIONALEMAIL
,
UserConstants
.
INSTITUTIONALUSERIDENTIFIER
};
private
ValidDataModel
validModel
;
private
ValidDataModel
invalidModel
;
private
FlexiTableElement
validTableEl
;
private
FlexiTableElement
invalidTableEl
;
private
final
UserManager
userManager
;
private
final
BaseSecurity
securityManager
;
public
ValidationStepForm
(
UserRequest
ureq
,
WindowControl
wControl
,
StepsRunContext
runContext
,
Form
rootForm
)
{
super
(
ureq
,
wControl
,
rootForm
,
runContext
,
LAYOUT_CUSTOM
,
"validation"
);
userManager
=
CoreSpringFactory
.
getImpl
(
UserManager
.
class
);
securityManager
=
CoreSpringFactory
.
getImpl
(
BaseSecurity
.
class
);
initForm
(
ureq
);
doValidate
();
...
...
@@ -150,16 +152,13 @@ public class ValidationStepForm extends StepFormBasicController {
continue
;
}
Map
<
String
,
String
>
userProperties
=
new
HashMap
<
String
,
String
>();
for
(
String
prop
:
userPropsToSearch
)
{
userProperties
.
put
(
prop
,
assessedId
);
List
<
Identity
>
identities
=
securityManager
.
getIdentitiesByPowerSearch
(
null
,
userProperties
,
false
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
);
if
(!
identities
.
isEmpty
())
{
idToIdentityMap
.
put
(
assessedId
,
identities
.
get
(
0
));
break
;
identity
=
userManager
.
findIdentityKeyWithProperty
(
prop
,
assessedId
);
if
(
identity
!=
null
)
{
idToIdentityMap
.
put
(
assessedId
,
identity
);
continue
;
}
userProperties
.
clear
();
}
}
}
return
idToIdentityMap
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment