Skip to content

Commit

Permalink
SAK-29874 use getBoolean for cleaner code instead of comparing string…
Browse files Browse the repository at this point in the history
…s to true/false

SAK-29874 consistent use of boolean fetching from ServerConfigurationService
  • Loading branch information
ottenhoff committed Sep 16, 2015
1 parent 763b14b commit ff1245f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ private Workbook createAttendanceDataWorksheet(List<SignupMeetingWrapper> wrappe
*/
public boolean isAttendanceOn(List<SignupMeetingWrapper> wrappers) {

if ("true".equalsIgnoreCase(sakaiFacade.getServerConfigurationService().getString("signup.enableAttendance","false"))){
if (sakaiFacade.getServerConfigurationService().getBoolean("signup.enableAttendance", false)) {
for (SignupMeetingWrapper wrp : wrappers) {
if (wrp.getMeeting().isAllowAttendance()){
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public boolean isOtherSitesAvailability() {
String toolProperty = sakaiFacade.getToolManager().getCurrentPlacement().getConfig().getProperty("signup.other.sites.availability", "default");
if (toolProperty.equals("default")) {
//If tool property is not set, then consider sakai property
String sakaiProperty= "false".equalsIgnoreCase(sakaiFacade.getServerConfigurationService().getString("signup.otherSitesAvailability", "true"))? "false" : "true" ;
String sakaiProperty = Boolean.valueOf(sakaiFacade.getServerConfigurationService().getBoolean("signup.otherSitesAvailability", true)).toString();
toolProperty = sakaiProperty;
}
//tool property would take precedence over sakai property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ public boolean isUserLoggedInStatus(){
*/
public boolean isAttendanceOn() {

if ("true".equalsIgnoreCase(getSakaiFacade().getServerConfigurationService().getString("signup.enableAttendance","true"))){
if (getSakaiFacade().getServerConfigurationService().getBoolean("signup.enableAttendance", true)) {
return true;
}
else{
Expand Down

0 comments on commit ff1245f

Please sign in to comment.