|
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; |
@@ -155,12 +156,18 @@ private void printOneExercise(boolean showAll) { |
155 | 156 | private void printExerciseShort() { |
156 | 157 | io.println("Exercise: " + exercise.getName()); |
157 | 158 | io.println("Deadline: " + getDeadline(exercise)); |
158 | | - io.println(formatString("completed", exercise.isCompleted())); |
159 | | - if (!exercise.isCompleted() && exercise.isAttempted()) { |
160 | | - io.println(Color.colorString("attempted", ANSI_BLUE)); |
161 | | - } |
162 | | - if (exercise.requiresReview()) { |
163 | | - io.println(formatString("reviewed", exercise.isReviewed())); |
| 159 | + |
| 160 | + if (exercise.hasDeadlinePassed() && !exercise.isCompleted()) { |
| 161 | + io.println(Color.colorString("deadline passed", ANSI_PURPLE)); |
| 162 | + } else { |
| 163 | + if (!exercise.isCompleted() && exercise.isAttempted()) { |
| 164 | + io.println(Color.colorString("attempted", ANSI_BLUE)); |
| 165 | + } else { |
| 166 | + io.println(formatString("completed", exercise.isCompleted())); |
| 167 | + } |
| 168 | + if (exercise.requiresReview()) { |
| 169 | + io.println(formatString("reviewed", exercise.isReviewed())); |
| 170 | + } |
164 | 171 | } |
165 | 172 | } |
166 | 173 |
|
|
0 commit comments