File tree Expand file tree Collapse file tree 2 files changed +3
-14
lines changed
tmc-plugin/src/fi/helsinki/cs/tmc Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -69,19 +69,8 @@ protected CourseDb getCourseDb() {
69
69
}
70
70
71
71
@ Override
72
- public boolean enable (Project ... projects ) {
73
- if (projects .length != 1 ) {
74
- return false ; // One at a time please
75
- }
76
-
77
- TmcProjectInfo projectInfo = projectMediator .wrapProject (projects [0 ]);
78
- Exercise exercise = projectMediator .tryGetExerciseForProject (projectInfo , courseDb );
79
-
80
- if (exercise != null && !exercise .isCodeReviewRequestsEnabled ()) {
81
- return false ;
82
- }
83
-
84
- return super .enable (projects );
72
+ protected boolean enabledFor (Exercise exercise ) {
73
+ return exercise .isCodeReviewRequestsEnabled () && super .enabledFor (exercise );
85
74
}
86
75
87
76
@ Override
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public class Exercise implements Serializable {
58
58
private ValgrindStrategy valgrindStrategy = ValgrindStrategy .FAIL ;
59
59
60
60
@ SerializedName ("code_review_requests_enabled" )
61
- private boolean codeReviewRequestsEnabled ;
61
+ private boolean codeReviewRequestsEnabled = true ;
62
62
63
63
public enum ValgrindStrategy {
64
64
@ SerializedName ("" )
You can’t perform that action at this time.
0 commit comments