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
0f0384c0
Commit
0f0384c0
authored
5 years ago
by
uhensler
Browse files
Options
Downloads
Patches
Plain Diff
OO-4285: RS when open the learning path report
parent
70f9bd8f
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/userview/UserCourseEnvironmentImpl.java
+10
-1
10 additions, 1 deletion
...g/olat/course/run/userview/UserCourseEnvironmentImpl.java
with
10 additions
and
1 deletion
src/main/java/org/olat/course/run/userview/UserCourseEnvironmentImpl.java
+
10
−
1
View file @
0f0384c0
...
@@ -28,12 +28,14 @@ package org.olat.course.run.userview;
...
@@ -28,12 +28,14 @@ package org.olat.course.run.userview;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
org.olat.basesecurity.BaseSecurity
;
import
org.olat.basesecurity.OrganisationRoles
;
import
org.olat.basesecurity.OrganisationRoles
;
import
org.olat.core.CoreSpringFactory
;
import
org.olat.core.CoreSpringFactory
;
import
org.olat.core.commons.persistence.PersistenceHelper
;
import
org.olat.core.commons.persistence.PersistenceHelper
;
import
org.olat.core.gui.UserRequest
;
import
org.olat.core.gui.UserRequest
;
import
org.olat.core.gui.control.WindowControl
;
import
org.olat.core.gui.control.WindowControl
;
import
org.olat.core.id.IdentityEnvironment
;
import
org.olat.core.id.IdentityEnvironment
;
import
org.olat.core.id.Roles
;
import
org.olat.course.ICourse
;
import
org.olat.course.ICourse
;
import
org.olat.course.assessment.manager.EfficiencyStatementManager
;
import
org.olat.course.assessment.manager.EfficiencyStatementManager
;
import
org.olat.course.certificate.CertificatesManager
;
import
org.olat.course.certificate.CertificatesManager
;
...
@@ -218,7 +220,7 @@ public class UserCourseEnvironmentImpl implements UserCourseEnvironment {
...
@@ -218,7 +220,7 @@ public class UserCourseEnvironmentImpl implements UserCourseEnvironment {
// If a course is open to all users, a user may is not a member but has access as well.
// If a course is open to all users, a user may is not a member but has access as well.
// Such a user has to act as a participant as well.
// Such a user has to act as a participant as well.
if
(
allUsersParticipant
==
null
)
{
if
(
allUsersParticipant
==
null
)
{
boolean
allUsersOnly
=
!
isAdmin
()
&&
!
isCoach
()
&&
!
getIdentityEnvironment
().
getRoles
().
isGuestOnly
();
boolean
allUsersOnly
=
!
isAdmin
()
&&
!
isCoach
()
&&
!
isGuestOnly
();
allUsersParticipant
=
Boolean
.
valueOf
(
allUsersOnly
);
allUsersParticipant
=
Boolean
.
valueOf
(
allUsersOnly
);
}
}
if
(
allUsersParticipant
.
booleanValue
())
{
if
(
allUsersParticipant
.
booleanValue
())
{
...
@@ -237,6 +239,13 @@ public class UserCourseEnvironmentImpl implements UserCourseEnvironment {
...
@@ -237,6 +239,13 @@ public class UserCourseEnvironmentImpl implements UserCourseEnvironment {
return
partLazy
;
return
partLazy
;
}
}
private
boolean
isGuestOnly
()
{
Roles
roles
=
getIdentityEnvironment
().
getRoles
()
!=
null
?
getIdentityEnvironment
().
getRoles
()
:
CoreSpringFactory
.
getImpl
(
BaseSecurity
.
class
).
getRoles
(
getIdentityEnvironment
().
getIdentity
());
return
roles
.
isGuestOnly
();
}
@Override
@Override
public
boolean
isMemberParticipant
()
{
public
boolean
isMemberParticipant
()
{
return
courseEnvironment
.
getCourseGroupManager
().
isIdentityCourseParticipant
(
identityEnvironment
.
getIdentity
());
return
courseEnvironment
.
getCourseGroupManager
().
isIdentityCourseParticipant
(
identityEnvironment
.
getIdentity
());
...
...
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