|
2 | 2 |
|
3 | 3 | import static fi.helsinki.cs.tmc.cli.io.Color.AnsiColor.ANSI_BLUE; |
4 | 4 | import static fi.helsinki.cs.tmc.cli.io.Color.AnsiColor.ANSI_GREEN; |
| 5 | +import static fi.helsinki.cs.tmc.cli.io.Color.AnsiColor.ANSI_PURPLE; |
5 | 6 | import static fi.helsinki.cs.tmc.cli.io.Color.AnsiColor.ANSI_RED; |
6 | 7 |
|
7 | 8 | import fi.helsinki.cs.tmc.cli.CliContext; |
@@ -152,12 +153,18 @@ private void printOneExercise(boolean showAll) { |
152 | 153 | private void printExerciseShort() { |
153 | 154 | io.println("Exercise: " + exercise.getName()); |
154 | 155 | io.println("Deadline: " + getDeadline(exercise)); |
155 | | - io.println(formatString("completed", exercise.isCompleted())); |
156 | | - if (!exercise.isCompleted() && exercise.isAttempted()) { |
157 | | - io.println(Color.colorString("attempted", ANSI_BLUE)); |
158 | | - } |
159 | | - if (exercise.requiresReview()) { |
160 | | - io.println(formatString("reviewed", exercise.isReviewed())); |
| 156 | + |
| 157 | + if (exercise.hasDeadlinePassed() && !exercise.isCompleted()) { |
| 158 | + io.println(Color.colorString("deadline passed", ANSI_PURPLE)); |
| 159 | + } else { |
| 160 | + if (!exercise.isCompleted() && exercise.isAttempted()) { |
| 161 | + io.println(Color.colorString("attempted", ANSI_BLUE)); |
| 162 | + } else { |
| 163 | + io.println(formatString("completed", exercise.isCompleted())); |
| 164 | + } |
| 165 | + if (exercise.requiresReview()) { |
| 166 | + io.println(formatString("reviewed", exercise.isReviewed())); |
| 167 | + } |
161 | 168 | } |
162 | 169 | } |
163 | 170 |
|
|
0 commit comments