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
5db65e27
Commit
5db65e27
authored
5 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-4640: load the context by key in metadata's bulk changes
parent
cfaeab58
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/modules/qpool/ui/metadata/MetadataBulkChangeController.java
+9
-4
9 additions, 4 deletions
...dules/qpool/ui/metadata/MetadataBulkChangeController.java
with
9 additions
and
4 deletions
src/main/java/org/olat/modules/qpool/ui/metadata/MetadataBulkChangeController.java
+
9
−
4
View file @
5db65e27
...
@@ -81,7 +81,11 @@ public class MetadataBulkChangeController extends FormBasicController {
...
@@ -81,7 +81,11 @@ public class MetadataBulkChangeController extends FormBasicController {
private
static
final
String
[]
EMPTY_VALUES
=
new
String
[]{
""
};
private
static
final
String
[]
EMPTY_VALUES
=
new
String
[]{
""
};
private
TextElement
topicEl
,
keywordsEl
,
coverageEl
,
addInfosEl
,
languageEl
;
private
TextElement
topicEl
;
private
TextElement
keywordsEl
;
private
TextElement
coverageEl
;
private
TextElement
addInfosEl
;
private
TextElement
languageEl
;
private
SingleSelection
taxonomyLevelEl
;
private
SingleSelection
taxonomyLevelEl
;
private
SingleSelection
contextEl
;
private
SingleSelection
contextEl
;
private
FormLayoutContainer
learningTimeContainer
;
private
FormLayoutContainer
learningTimeContainer
;
...
@@ -102,6 +106,7 @@ public class MetadataBulkChangeController extends FormBasicController {
...
@@ -102,6 +106,7 @@ public class MetadataBulkChangeController extends FormBasicController {
private
Map
<
MultipleSelectionElement
,
FormLayoutContainer
>
checkboxContainer
=
new
HashMap
<>();
private
Map
<
MultipleSelectionElement
,
FormLayoutContainer
>
checkboxContainer
=
new
HashMap
<>();
private
final
List
<
MultipleSelectionElement
>
checkboxSwitch
=
new
ArrayList
<>();
private
final
List
<
MultipleSelectionElement
>
checkboxSwitch
=
new
ArrayList
<>();
private
KeyValues
contextsKeyValues
;
private
final
QPoolSecurityCallback
qpoolSecurityCallback
;
private
final
QPoolSecurityCallback
qpoolSecurityCallback
;
private
List
<
QuestionItem
>
updatedItems
;
private
List
<
QuestionItem
>
updatedItems
;
private
final
List
<
ItemRow
>
items
;
private
final
List
<
ItemRow
>
items
;
...
@@ -165,9 +170,9 @@ public class MetadataBulkChangeController extends FormBasicController {
...
@@ -165,9 +170,9 @@ public class MetadataBulkChangeController extends FormBasicController {
}
}
if
(
qpoolSecurityCallback
.
canUseEducationalContext
())
{
if
(
qpoolSecurityCallback
.
canUseEducationalContext
())
{
KeyValue
s
context
s
=
MetaUIFactory
.
getContextKeyValues
(
getTranslator
(),
qpoolService
);
contexts
KeyValues
=
MetaUIFactory
.
getContextKeyValues
(
getTranslator
(),
qpoolService
);
contextEl
=
uifactory
.
addDropdownSingleselect
(
"educational.context"
,
"educational.context"
,
generalCont
,
contextEl
=
uifactory
.
addDropdownSingleselect
(
"educational.context"
,
"educational.context"
,
generalCont
,
contexts
.
getKeys
(),
contexts
.
getValues
(),
null
);
contexts
KeyValues
.
getKeys
(),
contexts
KeyValues
.
getValues
(),
null
);
contextEl
.
setAllowNoSelection
(
true
);
contextEl
.
setAllowNoSelection
(
true
);
decorate
(
contextEl
,
generalCont
);
decorate
(
contextEl
,
generalCont
);
}
}
...
@@ -417,7 +422,7 @@ public class MetadataBulkChangeController extends FormBasicController {
...
@@ -417,7 +422,7 @@ public class MetadataBulkChangeController extends FormBasicController {
private
void
formOKQuestion
(
QuestionItemImpl
itemImpl
)
{
private
void
formOKQuestion
(
QuestionItemImpl
itemImpl
)
{
if
(
isEnabled
(
contextEl
))
{
if
(
isEnabled
(
contextEl
))
{
if
(
contextEl
.
isOneSelected
())
{
if
(
contextEl
.
isOneSelected
())
{
QEducationalContext
context
=
qpoolService
.
getEducationl
ContextBy
Level
(
contextEl
.
getSelectedKey
());
QEducationalContext
context
=
MetaUIFactory
.
get
ContextBy
Key
(
contextEl
.
getSelectedKey
()
,
qpoolService
);
itemImpl
.
setEducationalContext
(
context
);
itemImpl
.
setEducationalContext
(
context
);
}
else
{
}
else
{
itemImpl
.
setEducationalContext
(
null
);
itemImpl
.
setEducationalContext
(
null
);
...
...
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