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
8027b336
Commit
8027b336
authored
5 years ago
by
uhensler
Browse files
Options
Downloads
Patches
Plain Diff
OO-4241: Course menu was not shown if the first course node is a CP with one page
parent
b2a2fe30
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/run/navigation/NavigationHandler.java
+21
-20
21 additions, 20 deletions
...ava/org/olat/course/run/navigation/NavigationHandler.java
with
21 additions
and
20 deletions
src/main/java/org/olat/course/run/navigation/NavigationHandler.java
+
21
−
20
View file @
8027b336
...
...
@@ -350,26 +350,6 @@ public class NavigationHandler implements Disposable {
NodeRunConstructionResult
ncr
=
new
NodeRunConstructionResult
(
controller
,
null
,
null
,
null
);
nclr
=
new
NodeClickedRef
(
treeModel
,
true
,
newSelectedNodeId
,
null
,
courseNode
,
ncr
,
false
);
}
else
{
// access ok
if
(
STCourseNode
.
isDelegatingSTCourseNode
(
courseNode
)
&&
(
courseNode
.
getChildCount
()
>
0
))
{
// the clicked node is a STCourse node and is set to "delegate", so
// delegate to its first visible child; if no child is visible, just skip and do normal eval
INode
child
;
for
(
int
i
=
0
;
i
<
courseNode
.
getChildCount
();
i
++)
{
child
=
courseNode
.
getChildAt
(
i
);
if
(
child
instanceof
CourseNode
)
{
CourseNode
cn
=
(
CourseNode
)
child
;
TreeNode
childTreeNode
=
treeModel
.
getNodeById
(
cn
.
getIdent
());
if
(
childTreeNode
!=
null
)
{
// not visible
return
doEvaluateJumpTo
(
ureq
,
wControl
,
cn
,
listeningController
,
nodecmd
,
nodeSubCmd
,
currentNodeController
);
}
}
}
}
// access the node, display its result in the right pane
NodeRunConstructionResult
ncr
;
// calculate the new businesscontext for the coursenode being called.
...
...
@@ -440,6 +420,23 @@ public class NavigationHandler implements Disposable {
reattachExternalTreeModels
(
treeModel
);
if
(
STCourseNode
.
isDelegatingSTCourseNode
(
courseNode
)
&&
(
courseNode
.
getChildCount
()
>
0
))
{
// the clicked node is a STCourse node and is set to "delegate", so
// delegate to its first visible child; if no child is visible, just skip and do normal eval
INode
child
;
for
(
int
i
=
0
;
i
<
courseNode
.
getChildCount
();
i
++)
{
child
=
courseNode
.
getChildAt
(
i
);
if
(
child
instanceof
CourseNode
)
{
CourseNode
cn
=
(
CourseNode
)
child
;
TreeNode
childTreeNode
=
treeModel
.
getNodeById
(
cn
.
getIdent
());
if
(
childTreeNode
!=
null
)
{
// visible
return
doEvaluateJumpTo
(
ureq
,
wControl
,
cn
,
listeningController
,
nodecmd
,
nodeSubCmd
,
currentNodeController
);
}
}
}
}
boolean
evaluateTree
=
false
;
for
(
NodeVisitedListener
nodeVisitedListener
:
nodeVisitedListeners
)
{
boolean
needsTreeEvaluation
=
nodeVisitedListener
.
onNodeVisited
(
courseNode
,
userCourseEnv
);
...
...
@@ -570,6 +567,10 @@ public class NavigationHandler implements Disposable {
// always insert before already existing course building block children
parent
.
insert
(
chdc
,
0
);
}
if
(
parent
instanceof
GenericTreeNode
)
{
((
GenericTreeNode
)
parent
).
setIdent
(
root
.
getIdent
());
}
}
private
static
class
SubTree
{
...
...
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