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
7d58f904
Commit
7d58f904
authored
8 years ago
by
fkiefer
Browse files
Options
Downloads
Patches
Plain Diff
OO-2133 do not take coach or admin results into account
parent
5884d1bc
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/highscore/ui/HighScoreRunController.java
+10
-6
10 additions, 6 deletions
.../org/olat/course/highscore/ui/HighScoreRunController.java
with
10 additions
and
6 deletions
src/main/java/org/olat/course/highscore/ui/HighScoreRunController.java
+
10
−
6
View file @
7d58f904
...
...
@@ -50,6 +50,7 @@ import org.olat.core.gui.control.WindowControl;
import
org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController
;
import
org.olat.core.id.Identity
;
import
org.olat.core.util.prefs.Preferences
;
import
org.olat.course.assessment.AssessmentManager
;
import
org.olat.course.highscore.manager.HighScoreManager
;
import
org.olat.course.highscore.model.HighScoreRankingResults
;
import
org.olat.course.nodes.CourseNode
;
...
...
@@ -116,7 +117,8 @@ public class HighScoreRunController extends FormBasicController{
CourseNode
courseNode
)
{
ownIdentity
=
userCourseEnv
.
getIdentityEnvironment
().
getIdentity
();
AssessmentEntry
ownEntry
=
userCourseEnv
.
getCourseEnvironment
().
getAssessmentManager
().
getAssessmentEntry
(
courseNode
,
ownIdentity
);
AssessmentManager
assessmentManager
=
userCourseEnv
.
getCourseEnvironment
().
getAssessmentManager
();
AssessmentEntry
ownEntry
=
assessmentManager
.
getAssessmentEntry
(
courseNode
,
ownIdentity
);
boolean
adminORcoach
=
userCourseEnv
.
isAdmin
()
||
userCourseEnv
.
isCoach
();
// guests will never see the highscore
...
...
@@ -133,17 +135,19 @@ public class HighScoreRunController extends FormBasicController{
List
<
AssessmentEntry
>
assessEntries
;
if
(
"iqtest"
.
equals
(
courseNode
.
getType
()))
{
assessEntries
=
userCourseEnv
.
getCourseEnvironment
().
getAssessmentManager
()
.
getAssessmentEntriesWithStatus
(
courseNode
,
AssessmentEntryStatus
.
done
);
assessEntries
=
assessmentManager
.
getAssessmentEntriesWithStatus
(
courseNode
,
AssessmentEntryStatus
.
done
);
}
else
{
assessEntries
=
userCourseEnv
.
getCourseEnvironment
().
getAssessmentManager
()
.
getAssessmentEntries
(
courseNode
);
assessEntries
=
assessmentManager
.
getAssessmentEntries
(
courseNode
);
}
// display only if has content
if
(
assessEntries
.
isEmpty
())
{
if
(
assessEntries
==
null
||
assessEntries
.
isEmpty
())
{
viewHighscore
=
false
;
return
;
}
// do not take coach or admin results into account
if
(
adminORcoach
)
{
assessEntries
.
remove
(
ownEntry
);
}
//initialize ModuleConfiguration
ModuleConfiguration
config
=
courseNode
.
getModuleConfiguration
();
...
...
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