Skip to content

Commit 086d67a

Browse files
committed
Do not offer to submit the exercise to server if deadline has passed
1 parent ca081e9 commit 086d67a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tmc-plugin/src/fi/helsinki/cs/tmc/data/ResultCollector.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ public void setReturnable(final boolean returnable) {
109109
}
110110

111111
private boolean isSubmittable() {
112+
if (exercise.hasDeadlinePassed()) {
113+
return false;
114+
}
112115

113116
for (TestResult result : testCaseResults) {
114117
if (!result.isSuccessful()) {

tmc-plugin/src/fi/helsinki/cs/tmc/ui/TestResultWindow.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ public Void apply(final Boolean yes) {
149149
return null;
150150
}
151151
});
152+
} else if (exercise.hasDeadlinePassed()) {
153+
dialogDisplayer.displayMessage("All tests passed, but exercise's deadline has expired.");
152154
}
153155
}
154156

0 commit comments

Comments
 (0)