Skip to content

Commit

Permalink
Cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Haozhe321 committed Apr 16, 2018
1 parent 341d083 commit 1030ee7
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,17 @@ public String getQuestionWithoutExistingResponseSubmissionFormHtml(
public int getNumOfChoicesForMsq(String courseId, FeedbackParticipantType generateOptionsFor) {
if (generateOptionsFor == FeedbackParticipantType.NONE) {
return msqChoices.size();
} else if (generateOptionsFor == FeedbackParticipantType.STUDENTS
}

if (generateOptionsFor == FeedbackParticipantType.STUDENTS
|| generateOptionsFor == FeedbackParticipantType.STUDENTS_EXCLUDING_SELF) {
List<StudentAttributes> studentList = StudentsLogic.inst().getStudentsForCourse(courseId);
int sizeOfStudentlist = studentList.size();

return generateOptionsFor == FeedbackParticipantType.STUDENTS ? sizeOfStudentlist : sizeOfStudentlist - 1;
} else if (generateOptionsFor == FeedbackParticipantType.TEAMS
}

if (generateOptionsFor == FeedbackParticipantType.TEAMS
|| generateOptionsFor == FeedbackParticipantType.TEAMS_EXCLUDING_SELF) {
try {
List<TeamDetailsBundle> teamList = CoursesLogic.inst().getTeamsForCourse(courseId);
Expand All @@ -347,12 +351,10 @@ public int getNumOfChoicesForMsq(String courseId, FeedbackParticipantType genera
} catch (EntityDoesNotExistException e) {
Assumption.fail("Course disappeared");
}
} else {
List<InstructorAttributes> instructorList = InstructorsLogic.inst().getInstructorsForCourse(courseId);

return instructorList.size();
}
return 0;
List<InstructorAttributes> instructorList = InstructorsLogic.inst().getInstructorsForCourse(courseId);

return instructorList.size();
}

private List<String> generateOptionList(String courseId) {
Expand Down Expand Up @@ -482,8 +484,8 @@ public String getNewQuestionSpecificEditFormHtml() {
+ "</div>";
}

//Confusing Ternary flagged for the `else if` condition below.
//Note: Exclusion to this rule will be added in future PMD patch.
// Confusing Ternary flagged for the `else if` condition below.
// Note: Exclusion to this rule will be added in future PMD patch.
@SuppressWarnings("PMD.ConfusingTernary")
@Override
public String getQuestionAdditionalInfoHtml(int questionNumber, String additionalInfoId) {
Expand Down

0 comments on commit 1030ee7

Please sign in to comment.