Skip to content

Commit

Permalink
Merge pull request #122 from Bram-Hub/batch-grader_issue121-ungradeab…
Browse files Browse the repository at this point in the history
…les-should-not-be-0

Update LegupUI.java
  • Loading branch information
charlestian23 authored Jun 9, 2022
2 parents 96e2cc6 + 80702c2 commit cc3ab7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/edu/rpi/legup/ui/LegupUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,12 @@ private void traverseDir(File folder, BufferedWriter writer, String path) throws

// Folder is empty
if(folder.listFiles().length == 0) {
writer.append(path + ",Empty folder,0,Ungradeable\n");
writer.append(path + ",Empty folder,,Ungradeable\n");
return;
}

// Travese directory, recurse if sub-directory found
// If ungradeable, do not leave a score (0, 1)
for(final File f : folder.listFiles()) {
// Recurse
if(f.isDirectory()) {
Expand Down Expand Up @@ -574,7 +575,7 @@ private void traverseDir(File folder, BufferedWriter writer, String path) throws
if(puzzle.isPuzzleComplete()) writer.append("1,Solved\n");
else writer.append("0,Unsolved\n");
} catch (InvalidFileFormatException e) {
writer.append(fName + " - invalid type,0,Ungradeable\n");
writer.append(fName + " - invalid type,,Ungradeable\n");
}
} else {
LOGGER.debug("Failed to run sim");
Expand Down

0 comments on commit cc3ab7a

Please sign in to comment.