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
54f94bd1
Commit
54f94bd1
authored
4 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-4652: always calculate types of curriculum element based on parent
parent
a411d476
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/curriculum/ui/EditCurriculumElementController.java
+5
-7
5 additions, 7 deletions
...odules/curriculum/ui/EditCurriculumElementController.java
with
5 additions
and
7 deletions
src/main/java/org/olat/modules/curriculum/ui/EditCurriculumElementController.java
+
5
−
7
View file @
54f94bd1
...
@@ -149,7 +149,7 @@ public class EditCurriculumElementController extends FormBasicController {
...
@@ -149,7 +149,7 @@ public class EditCurriculumElementController extends FormBasicController {
uifactory
.
addStaticTextElement
(
"curriculum.element.external.id"
,
externalId
,
formLayout
);
uifactory
.
addStaticTextElement
(
"curriculum.element.external.id"
,
externalId
,
formLayout
);
}
}
boolean
canEdit
=
element
==
null
?
true
:
secCallback
.
canEditCurriculumElement
(
element
);
boolean
canEdit
=
element
==
null
||
secCallback
.
canEditCurriculumElement
(
element
);
String
identifier
=
element
==
null
?
""
:
element
.
getIdentifier
();
String
identifier
=
element
==
null
?
""
:
element
.
getIdentifier
();
identifierEl
=
uifactory
.
addTextElement
(
"identifier"
,
"curriculum.element.identifier"
,
255
,
identifier
,
formLayout
);
identifierEl
=
uifactory
.
addTextElement
(
"identifier"
,
"curriculum.element.identifier"
,
255
,
identifier
,
formLayout
);
...
@@ -309,9 +309,7 @@ public class EditCurriculumElementController extends FormBasicController {
...
@@ -309,9 +309,7 @@ public class EditCurriculumElementController extends FormBasicController {
private
List
<
CurriculumElementType
>
getTypes
()
{
private
List
<
CurriculumElementType
>
getTypes
()
{
List
<
CurriculumElementType
>
types
;
List
<
CurriculumElementType
>
types
;
if
(
element
!=
null
)
{
if
(
parentElement
!=
null
)
{
types
=
getTypes
(
element
);
}
else
if
(
parentElement
!=
null
)
{
types
=
getTypes
(
parentElement
);
types
=
getTypes
(
parentElement
);
}
else
{
}
else
{
types
=
new
ArrayList
<>();
types
=
new
ArrayList
<>();
...
@@ -325,10 +323,10 @@ public class EditCurriculumElementController extends FormBasicController {
...
@@ -325,10 +323,10 @@ public class EditCurriculumElementController extends FormBasicController {
return
types
;
return
types
;
}
}
private
List
<
CurriculumElementType
>
getTypes
(
CurriculumElement
curriculumElement
)
{
private
List
<
CurriculumElementType
>
getTypes
(
CurriculumElement
curriculum
Parent
Element
)
{
List
<
CurriculumElementType
>
types
=
new
ArrayList
<>();
List
<
CurriculumElementType
>
types
=
new
ArrayList
<>();
List
<
CurriculumElement
>
parentLine
=
curriculumService
.
getCurriculumElementParentLine
(
curriculumElement
);
List
<
CurriculumElement
>
parentLine
=
curriculumService
.
getCurriculumElementParentLine
(
curriculum
Parent
Element
);
for
(
int
i
=
parentLine
.
size
()
-
1
;
i
-->
0
;
)
{
for
(
int
i
=
parentLine
.
size
();
i
-->
0
;
)
{
CurriculumElement
parent
=
parentLine
.
get
(
i
);
CurriculumElement
parent
=
parentLine
.
get
(
i
);
CurriculumElementType
parentType
=
parent
.
getType
();
CurriculumElementType
parentType
=
parent
.
getType
();
if
(
parentType
!=
null
)
{
if
(
parentType
!=
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