Skip to content

Commit

Permalink
#1419 Updated GBNG business service to flesh out the course grade che…
Browse files Browse the repository at this point in the history
…ck for students and use the settings.
  • Loading branch information
steveswinsburg committed Dec 15, 2015
1 parent 72fb6cd commit cfd2ff1
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1827,6 +1827,7 @@ public boolean isCourseGradeVisible(String userUuid) {
return true;
}

//if TA, permission checks
if(role == GbRole.TA) {

//if no defs, implicitly allowed
Expand All @@ -1844,7 +1845,17 @@ public boolean isCourseGradeVisible(String userUuid) {
return false;
}

//students not currently supported. Could leverage the settings later.
//if student, check the settings
//this could actually get the settings but it would be more processing
if(role == GbRole.STUDENT) {
Gradebook gradebook = this.getGradebook(siteId);

if(gradebook.isCourseGradeDisplayed()) {
return true;
}
}

//other roles not yet catered for, catch all.
return false;
}

Expand Down

0 comments on commit cfd2ff1

Please sign in to comment.