public static void createLesson(@NotNull final Lesson lesson,@NotNull final VirtualFile courseDir,@NotNull final File resourceRoot,@NotNull final Project project) throws IOException {
  String lessonDirName=EduNames.LESSON + Integer.toString(lesson.getIndex());
  VirtualFile lessonDir=courseDir.createChildDirectory(project,lessonDirName);
  final List<Task> taskList=lesson.getTaskList();
  for (int i=1; i <= taskList.size(); i++) {
    Task task=taskList.get(i - 1);
    task.setIndex(i);
    createTask(task,lessonDir,new File(resourceRoot,lessonDir.getName()),project);
  }
}

public static void createLesson ( @ NotNull final Lesson lesson , @ NotNull final VirtualFile courseDir , @ NotNull final File resourceRoot , @ NotNull final Project project ) throws IOException { String lessonDirName = EduNames . LESSON + Integer . toString ( lesson . getIndex ( ) ) ; VirtualFile lessonDir = courseDir . createChildDirectory ( project , lessonDirName ) ; final List < Task > taskList = lesson . getTaskList ( ) ; for ( int i = 1 ; i <= taskList . size ( ) ; i ++ ) { Task task = taskList . get ( i - 1 ) ; task . setIndex ( i ) ; createTask ( task , lessonDir , new File ( resourceRoot , lessonDir . getName ( ) ) , project ) ; } }
creates lesson directory in its course folder in project user created
