File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
tmc-plugin/src/fi/helsinki/cs/tmc Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ protected String iconResource() {
64
64
@ Override
65
65
protected boolean enabledFor (Exercise exercise ) {
66
66
// Overridden to not care about the deadline
67
- return exercise .isReturnable ();
67
+ return exercise .isRunTestsLocallyActionEnabled () && exercise . isReturnable ();
68
68
}
69
69
70
70
@ Override
Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ public class Exercise implements Serializable {
60
60
@ SerializedName ("code_review_requests_enabled" )
61
61
private boolean codeReviewRequestsEnabled ;
62
62
63
+ @ SerializedName ("run_tests_locally_action_enabled" )
64
+ private boolean runTestsLocallyActionEnabled = true ;
65
+
63
66
public enum ValgrindStrategy {
64
67
@ SerializedName ("" )
65
68
NONE ,
@@ -273,6 +276,14 @@ public void setCodeReviewRequestsEnabled(boolean codeReviewRequestsEnabled) {
273
276
this .codeReviewRequestsEnabled = codeReviewRequestsEnabled ;
274
277
}
275
278
279
+ public boolean isRunTestsLocallyActionEnabled () {
280
+ return runTestsLocallyActionEnabled ;
281
+ }
282
+
283
+ public void setRunTestsLocallyActionEnabled (boolean runTestsLocallyActionEnabled ) {
284
+ this .runTestsLocallyActionEnabled = runTestsLocallyActionEnabled ;
285
+ }
286
+
276
287
@ Override
277
288
public String toString () {
278
289
return name ;
You can’t perform that action at this time.
0 commit comments