turn off smart checker for course creator
[idea/community.git] / python / educational-python / student-python / src / com / jetbrains / edu / learning / PyStudyCheckAction.java
index 43f5fc5645f4f6ef3916e8a5a7c3808ac857e2e1..fdb110718b3401f5a580a6754481228f6e825a88 100644 (file)
@@ -16,6 +16,7 @@ import com.jetbrains.edu.learning.checker.StudyCheckTask;
 import com.jetbrains.edu.learning.checker.StudyCheckUtils;
 import com.jetbrains.edu.learning.checker.StudyTestRunner;
 import com.jetbrains.edu.learning.checker.StudyTestsOutputParser;
+import com.jetbrains.edu.learning.core.EduNames;
 import com.jetbrains.edu.learning.courseFormat.StudyStatus;
 import com.jetbrains.edu.learning.courseFormat.Task;
 import com.jetbrains.edu.learning.courseFormat.TaskFile;
@@ -103,9 +104,11 @@ public class PyStudyCheckAction extends StudyCheckAction {
                     myTaskManger.setStatus(taskFile, StudyStatus.Failed);
                     continue;
                   }
-                  CommandProcessor.getInstance().runUndoTransparentAction(() -> ApplicationManager.getApplication().runWriteAction(() -> {
-                    StudyCheckUtils.runSmartTestProcess(myTaskDir, testRunner, name, taskFile, project);
-                  }));
+                  if (EduNames.STUDY.equals(myTaskManger.getCourse().getCourseMode())) {
+                    CommandProcessor.getInstance().runUndoTransparentAction(() -> ApplicationManager.getApplication().runWriteAction(() -> {
+                      StudyCheckUtils.runSmartTestProcess(myTaskDir, testRunner, name, taskFile, project);
+                    }));
+                  }
                 }
                 StudyCheckUtils.showTestResultPopUp(testsOutput.getMessage(), MessageType.ERROR.getPopupBackground(), project);
                 StudyCheckUtils.navigateToFailedPlaceholder(myStudyState, myTask, myTaskDir, project);