Skip to content
Snippets Groups Projects
Commit 3013c87f authored by fkiefer's avatar fkiefer
Browse files

OO-2133 ease restrictions on STCourseNode, allow coach and admin view

parent 19fbbbb9
No related branches found
No related tags found
No related merge requests found
......@@ -146,14 +146,13 @@ public class HighScoreRunController extends FormBasicController{
if (ownEntry != null && ownEntry.getUserVisibility() != null && !ownEntry.getUserVisibility().booleanValue()) {
viewHighscore = false;
return;
}
}
boolean adminORcoach = userCourseEnv.isAdmin() || userCourseEnv.isCoach();
// ban zero scorer from viewing the highscore on STCourseNode
if(isSTCourseNode && ownEntry != null && ownEntry.getScore().equals(new BigDecimal(0))) {
if(!adminORcoach && isSTCourseNode && ownEntry != null && ownEntry.getScore().equals(new BigDecimal(0))) {
viewHighscore = false;
return;
}
boolean adminORcoach = userCourseEnv.isAdmin() || userCourseEnv.isCoach();
// coaches or admin may see highscore, user only if already scored
if (!adminORcoach && (ownEntry == null || (ownEntry != null && ownEntry.getScore() == null))) {
viewHighscore = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment